harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Deakin (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-4774) [classlib][luni] java.util.Scanner.nextLine() has a problem on newline
Date Mon, 11 Feb 2008 17:38:07 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-4774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Oliver Deakin reassigned HARMONY-4774:
--------------------------------------

    Assignee: Oliver Deakin

> [classlib][luni] java.util.Scanner.nextLine() has a problem on newline
> ----------------------------------------------------------------------
>
>                 Key: HARMONY-4774
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4774
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Win32
>            Reporter: Linbin Yu
>            Assignee: Oliver Deakin
>         Attachments: Harmony.PNG, RI.PNG
>
>
> Using "java.util.Scanner.nextLine() " to get a input from user,
> you must press Enter key twice to end inputing. 
> This is a demo:
> import java.util.Scanner;
> public class test {
> 	String s1, s2;
> 	test() {
> 		Scanner input = new Scanner(System.in);
> 		System.out.print("Enter:");
> 		s1 = input.nextLine();
> 		System.out.print("Enter:");
> 		s2 = input.nextLine();
> 		System.out.println("String1:" + s1);
> 		System.out.println("String2:" + s2);
> 	}
> 	public static void main(String[] args) {
> 		new test();
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message