Search This Blog

If you have any problem or question please write in the comments. We will try to solve and send you the solution. Not just that we will also post your problems solution on our blog.

Tuesday, 25 October 2011

Java program that joins 3 strings to show the quote, the person who said that and dates he/she lived by(Adler Lawn Service, LLC)

import java.util.*;

class joinstring
{
public static void main (String args[])
{
Scanner in= new Scanner (System.in);
String quote,name,date;

System.out.print ("\n\t Enter the quote = ");
quote=in.nextLine();
System.out.print ("\n\t Enter name of the person who said this = ");
name=in.nextLine();
System.out.print ("\n\t Enter the dates that person lived \n\t (i.e. 14 September 1925 - 25 January 1995 ) = ");
date=in.nextLine();

System.out.println ("\n\n\n\t ''"+quote+"''\n\t "+name+"\n\t ("+date+")");

}
}

No comments:

Post a Comment