Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scanner keyboard = new Scanner(System.in);
- System.out.print("Enter a string of characters: ");
- String characters;
- characters = keyboard.nextLine();
- System.out.println("The length of string " + "\"" + characters + "\" "
- + "is " + characters.length());
- //Enter a string of characters: The length of string "" is 0 thats what it is saying.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement