2-22 StringMethods

posted Jan 23, 2014, 3:36 AM by Dlovan ismail   [ updated Jan 23, 2014, 3:39 AM by Karwan Jacksi ]
// This program demonstrates a few of the String methods.

package stringmethods;

public class StringMethods
{
    public static void main(String[] args)
    {
            String message = "Java is Great Fun!";
            String upper = message.toUpperCase();
            String lower = message.toLowerCase();
            char letter = message.charAt(2);
            int stringSize =message.length();

            System.out.println(message);
            System.out.println(upper);
            System.out.println(lower);
            System.out.println(letter);
            System.out.println(stringSize);
    }    
}

ċ
StringMethods.java
(1k)
Karwan Jacksi,
Jan 23, 2014, 3:36 AM
Comments