Results 1 to 2 of 2
- 05-18-2010, 11:23 PM #1
Member
- Join Date
- Mar 2010
- Posts
- 49
- Rep Power
- 0
dear professionals, please help me with this !!
Suppose you enter 34.3, the ENTER key, 57.8, the ENTER key, 789, the ENTER key. Analyze the following code.
Scanner scanner = new Scanner(System.in);
int value = scanner.nextDouble();
int doubleValue = scanner.nextInt();
String line = scanner.nextLine();
the answer is :
After the last statement is executed, line contains character '\n '
why ?????? please explain me with details,,, i really appreciate your help
-
Similar Threads
-
Nice to meet you, my dear developers,I got some questions
By wjcking in forum New To JavaReplies: 3Last Post: 03-10-2010, 05:51 PM -
Opening for java Professionals
By careertechy in forum Jobs OfferedReplies: 2Last Post: 01-15-2009, 12:40 PM -
Great Demand For IT Professionals.
By avularamesh4u in forum Jobs DiscussionReplies: 2Last Post: 12-30-2008, 05:05 PM -
Hello to JAVA Professionals
By ioc_spring in forum IntroductionsReplies: 2Last Post: 08-25-2008, 12:07 PM -
Requirement for Technical Professionals
By deepak_yoganishta in forum Jobs OfferedReplies: 0Last Post: 02-04-2008, 01:08 PM


LinkBack URL
About LinkBacks

Bookmarks