Skip to content

Instantly share code, notes, and snippets.

@mehtaparitosh
Created September 4, 2017 10:58
Show Gist options
  • Save mehtaparitosh/bf89e69f9b9d686d8d6515caa45c420d to your computer and use it in GitHub Desktop.
Save mehtaparitosh/bf89e69f9b9d686d8d6515caa45c420d to your computer and use it in GitHub Desktop.
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