Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scanner sc=new Scanner(System.in);
- String line=sc.nextLine();
- String uc="";
- Scanner line_sc=new Scanner(line);
- while(line_sc.hasNext()) {
- String word=line_sc.next();
- uc+=Character.toUppercase(word.charAt(0))+ word.substring(1)+" ";
- }
- System.out.println(uc.trim());
- String str = "input";
- String capital = str.substring(0, 1).toUpperCase() + str.substring(1);
- return str.equals(capital);
- return Character.isUpperCase(str.charAt(0));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement