tranleduy2000 / javaide

Code editor, java auto complete, java compiler, aapt, dx, zipsigner for Android
GNU General Public License v3.0
470 stars 158 forks source link

Problem with Scanner lib #29

Open TheElpower opened 6 years ago

TheElpower commented 6 years ago

package Com.test; import java.util.Scanner;

public class MainTest { public static void main(String args[]) { String str; int len; Scanner scan = new Scanner(System.in); System.out.print("Enter Your Name : "); str = scan.nextLine(); len = str.length(); System.out.print("Length of Entered String is " + len); } }

After running i put the name "aaa", press enter and the "aaa" turn into "asa" and the part of the length of strings plays normal

TheElpower commented 6 years ago

screenshot_20171111-014620 screenshot_20171111-014614