Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 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. String word=line_sc.next();
  7. uc+=Character.toUppercase(word.charAt(0))+ word.substring(1)+" ";
  8. }
  9. System.out.println(uc.trim());
  10.  
  11. String str = "input";
  12. String capital = str.substring(0, 1).toUpperCase() + str.substring(1);
  13.  
  14. return str.equals(capital);
  15.  
  16. return Character.isUpperCase(str.charAt(0));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement