ChangeCase.java Source code

Java tutorial

Introduction

Here is the source code for ChangeCase.java

Source

class ChangeCase {
    public static void main(String args[]) {
        String s = "This is a test.";

        System.out.println("Original: " + s);

        String upper = s.toUpperCase();
        String lower = s.toLowerCase();

        System.out.println("Uppercase: " + upper);
        System.out.println("Lowercase: " + lower);
    }
}