Skip to content

Instantly share code, notes, and snippets.

@Jack-Saleem
Created January 15, 2016 13:12
Show Gist options
  • Select an option

  • Save Jack-Saleem/8c8dd7234a78ff695d9b to your computer and use it in GitHub Desktop.

Select an option

Save Jack-Saleem/8c8dd7234a78ff695d9b to your computer and use it in GitHub Desktop.
Codeforces 281A WordCapitalization program in java
import java.util.Scanner;
public class WordCapitalization
{
public static void main(String args[])
{
Scanner ip = new Scanner(System.in);
String x = ip.next();
StringBuffer buf = new StringBuffer(x);
System.out.println(buf.substring(0, 1).toUpperCase()+buf.substring(1));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment