Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main {
- public static void main(String[] args) {
- int MyValue = 1000;
- int MinIntValue = Integer.MIN_VALUE;
- int MaxIntValue = Integer.MAX_VALUE;
- System.out.println("INTEGER MIN VALUE = "+ MinIntValue);
- System.out.println("INTEGER MAX VALUE = "+ MaxIntValue);
- System.out.println("Busted MAX Value = " + (MaxIntValue + 1));
- System.out.println("Busted MIN Value = " + (MinIntValue - 1));
- int MyMaxIntTest = 2_147_483_647;
- byte MyMinByteValue = Byte.MIN_VALUE;
- byte MyMaxByteValue = Byte.MAX_VALUE;
- System.out.println("Byte Minimum Value = " + MyMinByteValue);
- System.out.println("Byte Maximum Value = " + MyMaxByteValue);
- short MyMinShortValue = Short.MIN_VALUE;
- short MyMaxShortValue = Short.MAX_VALUE;
- System.out.println("Short Minimum Value = " + MyMinShortValue);
- System.out.println("Short Maximum Value = " + MyMaxShortValue);
- long MyLongValue = 100L;
- long MyMinLongValue = Long.MIN_VALUE;
- long MyMaxLongValue = Long.MAX_VALUE;
- System.out.println("Long Minimum Value = " + MyMinLongValue);
- System.out.println("Long Maximum Value = " + MyMaxLongValue);
- byte ChallengeByte = 100;
- short ChallengeShort =30_000;
- int ChallengeInt = 200_000;
- long ChallengeLong = 50000 + 10 * (ChallengeByte + ChallengeShort + ChallengeInt);
- System.out.println(ChallengeLong);
- float MyMinFloatValue = Float.MIN_VALUE;
- float MyMaxFloatValue = Float.MAX_VALUE;
- System.out.println("Float Minimum Value = " + MyMinFloatValue);
- System.out.println("Float Maximum Value = " + MyMaxFloatValue);
- double MyMinDoubleValue = Double.MIN_VALUE;
- double MyMaxDoubleValue = Double.MAX_VALUE;
- System.out.println("Double Minimum Value = " + MyMinDoubleValue);
- System.out.println("Double Maximum Value = " + MyMaxDoubleValue);
- int MyIntValue = 5 / 2;
- float MyfloatValue = (float) 5 / 3;
- double MyDoubleValue = 5 / 3.00 ;
- System.out.println("MyIntValue = " + MyIntValue);
- System.out.println("MyFloatValue = " + MyfloatValue);
- System.out.println("MyDoubleValue = " + MyDoubleValue);
- double NumberOfPounds = 12.8556;
- double ConvertedKilograms = NumberOfPounds * 0.45359237;
- System.out.println(ConvertedKilograms);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement