ariestamirra

maxmin

May 25th, 2014
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.28 KB | None | 0 0
  1. package Percobaan;
  2. public class MaxMin {
  3.     public static void main(String[] args) {
  4.         System.out.println("Nilai Maximum");
  5.         Byte byteObj = new Byte(Byte.MAX_VALUE);
  6.         System.out.println(byteObj);
  7.         Short shortObj = new Short(Short.MAX_VALUE);
  8.         System.out.println(shortObj);
  9.         Integer intObj = new Integer(Integer.MAX_VALUE);
  10.         System.out.println(intObj);
  11.         Long longObj = new Long(Long.MAX_VALUE);
  12.         System.out.println(longObj);
  13.         Float floatObj = new Float(Float.MAX_VALUE);
  14.         System.out.println(floatObj);
  15.         Double doubleObj = new Double(Double.MAX_VALUE);
  16.         System.out.println(doubleObj);
  17.         System.out.println("Nilai Minimum");
  18.         Byte byteObj2 = new Byte(Byte.MIN_VALUE);
  19.         System.out.println(byteObj2);
  20.         Short shortObj2 = new Short(Short.MIN_VALUE);
  21.         System.out.println(shortObj2);
  22.         Integer intObj2 = new Integer(Integer.MIN_VALUE);
  23.         System.out.println(intObj2);
  24.         Long longObj2 = new Long(Long.MIN_VALUE);
  25.         System.out.println(longObj2);
  26.         Float floatObj2 = new Float(Float.MIN_VALUE);
  27.         System.out.println(floatObj2);
  28.         Double doubleObj2 = new Double(Double.MIN_VALUE);
  29.         System.out.println(doubleObj2);
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment