Problem:
Create a revised version of the Lincoln application from Chapter
1 such that quotes appear around the quotation.
1 such that quotes appear around the quotation.
Output:
A quote by Abraham Lincoln:
"Whatever you are, be a good one."
"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