Skip to content

Instantly share code, notes, and snippets.

@meyerzinn
Created June 12, 2014 19:20
Show Gist options
  • Save meyerzinn/de03f88099ea36b9c735 to your computer and use it in GitHub Desktop.
Save meyerzinn/de03f88099ea36b9c735 to your computer and use it in GitHub Desktop.
String Functions
package jcamp;
import java.util.Arrays;
public class StringFunctions {
public static void main(String[] args) {
String str = new String("Hello!");
char[] chars = str.toCharArray();
System.out.println("Original: " + str);
str = str.toLowerCase();
System.out.println("toLowerCase(): " + str);
str = str.toUpperCase();
System.out.println("toUpperCase(): " + str);
System.out.println("toCharArray(): " + Arrays.toString(chars));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment