You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Stepan Mishura (JIRA)" <ji...@apache.org> on 2008/02/12 05:14:07 UTC

[jira] Commented: (HARMONY-4774) [classlib][luni] java.util.Scanner.nextLine() has a problem on newline

    [ https://issues.apache.org/jira/browse/HARMONY-4774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567943#action_12567943 ] 

Stepan Mishura commented on HARMONY-4774:
-----------------------------------------

Oliver,Linbin, the commit r620543 does include a regression test. Is it possible to create it? Could you add it?


> [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.