Advertisement
Guest User

Untitled

a guest
Apr 9th, 2020
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.45 KB | None | 0 0
  1. public class Main {
  2.  
  3.     public static void main(String[] args) {
  4.  
  5.         int MyValue = 1000;
  6.  
  7.         int MinIntValue = Integer.MIN_VALUE;
  8.         int MaxIntValue = Integer.MAX_VALUE;
  9.         System.out.println("INTEGER MIN VALUE = "+ MinIntValue);
  10.         System.out.println("INTEGER MAX VALUE = "+ MaxIntValue);
  11.         System.out.println("Busted MAX Value = " + (MaxIntValue + 1));
  12.         System.out.println("Busted MIN Value = " + (MinIntValue - 1));
  13.  
  14.         int MyMaxIntTest = 2_147_483_647;
  15.  
  16.         byte MyMinByteValue = Byte.MIN_VALUE;
  17.         byte MyMaxByteValue = Byte.MAX_VALUE;
  18.         System.out.println("Byte Minimum Value = " + MyMinByteValue);
  19.         System.out.println("Byte Maximum Value = " + MyMaxByteValue);
  20.  
  21.         short MyMinShortValue = Short.MIN_VALUE;
  22.         short MyMaxShortValue = Short.MAX_VALUE;
  23.         System.out.println("Short Minimum Value = " + MyMinShortValue);
  24.         System.out.println("Short Maximum Value = " + MyMaxShortValue);
  25.  
  26.         long MyLongValue = 100L;
  27.         long MyMinLongValue = Long.MIN_VALUE;
  28.         long MyMaxLongValue = Long.MAX_VALUE;
  29.         System.out.println("Long Minimum Value = " + MyMinLongValue);
  30.         System.out.println("Long Maximum Value = " + MyMaxLongValue);
  31.  
  32.         byte ChallengeByte = 100;
  33.         short ChallengeShort =30_000;
  34.         int ChallengeInt = 200_000;
  35.  
  36.         long ChallengeLong = 50000 + 10 * (ChallengeByte + ChallengeShort + ChallengeInt);
  37.         System.out.println(ChallengeLong);
  38.  
  39.         float MyMinFloatValue = Float.MIN_VALUE;
  40.         float MyMaxFloatValue = Float.MAX_VALUE;
  41.         System.out.println("Float Minimum Value = " + MyMinFloatValue);
  42.         System.out.println("Float Maximum Value = " + MyMaxFloatValue);
  43.  
  44.         double MyMinDoubleValue = Double.MIN_VALUE;
  45.         double MyMaxDoubleValue = Double.MAX_VALUE;
  46.         System.out.println("Double Minimum Value = " + MyMinDoubleValue);
  47.         System.out.println("Double Maximum Value = " + MyMaxDoubleValue);
  48.  
  49.         int MyIntValue = 5 / 2;
  50.         float MyfloatValue = (float) 5 / 3;
  51.         double MyDoubleValue = 5 / 3.00 ;
  52.  
  53.         System.out.println("MyIntValue = " + MyIntValue);
  54.         System.out.println("MyFloatValue = " + MyfloatValue);
  55.         System.out.println("MyDoubleValue = " + MyDoubleValue);
  56.  
  57.         double NumberOfPounds = 12.8556;
  58.         double ConvertedKilograms = NumberOfPounds * 0.45359237;
  59.         System.out.println(ConvertedKilograms);
  60.     }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement