/** * Illustration of types (simple and class) * * @author (David John) * @version (a version number or a date) */ public class Illustator { /** * main method (application) */ public static void main (String[] args) { // two strings String myGreeting1 = "Hello CSC111 Class"; String myGreeting2 = "Today is Monday, Labor Day"; // compute the length of the two Strings int my1GrLen = myGreeting1.length(); int my2GrLen = myGreeting2.length(); // compute the total length of the two strings int totGrLen = my1GrLen + my2GrLen; // convert message 1 to upper case myGreeting1 = myGreeting1.toUpperCase(); // Write out messages System.out.println(myGreeting1); System.out.println(myGreeting2); // Write simple statistics about the messages System.out.println("The number of characters in message 1 is: " + my1GrLen); System.out.println("The number of characters in message 2 is: " + my2GrLen); System.out.println("The total number of message characters is: " + totGrLen); } }