Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. Scanner sc=new Scanner(System.in);
  2. String line=sc.nextLine();
  3. String uc="";
  4. Scanner line_sc=new Scanner(line);
  5. while(line_sc.hasNext())
  6. {
  7. String word=line_sc.next();
  8. uc+=Character.toUppercase(word.charAt(0))+ word.substring(1)+" ";
  9. }
  10. System.out.println(uc.trim());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement