Java Software Solutions >PP2.1 > Solution

Problem:

Create a revised version of the Lincoln application from Chapter
1 such that quotes appear around the quotation.

Output:

A quote by Abraham Lincoln:
"Whatever you are, be a good one."

Solution:

class Lincoln4
{
   //-----------------------------------------------------------------
   //  Prints a quote from Abraham Lincoln, including quotation
   //  marks.
   //-----------------------------------------------------------------
   public static void main (String[] args)
   {
      System.out.println ("A quote by Abraham Lincoln:");

      System.out.println ("\"Whatever you are, be a good one.\"");
   }
}


No comments :

Post a Comment

Follow Me

If you like our content, feel free to follow me to stay updated.

Subscribe

Enter your email address:

We hate spam as much as you do.

Upload Material

Got an exam, project, tutorial video, exercise, solutions, unsolved problem, question, solution manual? We are open to any coding material. Why not upload?

Upload

Copyright © 2012 - 2014 Java Problems  --  About  --  Attribution  --  Privacy Policy  --  Terms of Use  --  Contact