* To change this template, choose Tools | Templates * and open the template in the editor. */ package maxvariabledemojava; /** * * @author Student */ public class Main { /** * @param args the command line arguments */ public static void main(String args[]) { //integers byte largestByte = Byte.MAX_VALUE; short largestShort = Short.MAX_VALUE; int largestInteger = Integer.MAX_VALUE; long largestLong = Long.MAX_VALUE; byte smallestByte = Byte.MIN_VALUE; short smallestShort = Short.MIN_VALUE; int smallestInteger = Integer.MIN_VALUE; long smallestLong = Long.MIN_VALUE; //real numbers float largestFloat = Float.MAX_VALUE; double largestDouble = Double.MAX_VALUE; float smallestFloat = Float.MIN_VALUE; double smallestDouble = Double.MIN_VALUE; // other primitive types char aChar = 'S'; boolean aBoolean = true; //display them all System.out.println("The largest byte value is" + largestByte); System.out.println("The largest short value is" + largestShort); System.out.println("The largest integer value is" + largestInteger); System.out.println("The largest long value is" + largestLong); System.out.println("The smallest byte value is" + smallestByte); System.out.println("The smallest short value is" + smallestShort); System.out.println("The smallest integer value is" + smallestInteger); System.out.println("The smallest long value is" + smallestLong); System.out.println("The largest float value is" + largestFloat); System.out.println("The largest doulbe value is" + largestDouble); System.out.println("The smallest float value is" + smallestFloat); System.out.println("The smallest doulbe value is" + smallestDouble); if (Character.isUpperCase(aChar)){ System.out.println("The character" +aChar+ "is upper case."); }else{ System.out.println("The character" + aChar + "is lower case"); } System.out.println("The value of Boolean is" + aBoolean); } }