Created
September 4, 2017 10:58
-
-
Save mehtaparitosh/bf89e69f9b9d686d8d6515caa45c420d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.io.*; | |
/** | |
* | |
* @author paritosh mehta | |
*/ | |
import java.util.*; | |
public class JadenCase { | |
public static void main(String[] args){ | |
Scanner in = new Scanner(System.in); | |
System.out.print("Input a Sentence: "); | |
String line = in.nextLine(); | |
String upper_case_line = ""; | |
Scanner lineScan = new Scanner(line); | |
while(lineScan.hasNext()) { | |
String word = lineScan.next(); | |
upper_case_line += Character.toUpperCase(word.charAt(0)) + word.substring(1) + " "; | |
} | |
System.out.println(upper_case_line.trim()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment