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());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement