-
Notifications
You must be signed in to change notification settings - Fork 0
/
rangesjava.java
27 lines (20 loc) · 1021 Bytes
/
rangesjava.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
public class rangesjava{
public static void main(String[] args){
int myMinIntValue = Integer.MIN_VALUE;
int myMaxIntValue = Integer.MAX_VALUE;
System.out.println("Integer Minimum Value = " + myMinIntValue);
System.out.println("Integer Maximum Value = " + myMaxIntValue);
System.out.println("Busted MAX value = " + (myMaxIntValue + 1));
System.out.println("Integer Maximum Value = " + (myMinIntValue - 1));
System.out.println("Byte Minimum Value = " + Byte.MIN_VALUE);
System.out.println("Byte Maximum Value = " + Byte.MAX_VALUE);
System.out.println("Long Minimum Value = " + Long.MIN_VALUE);
System.out.println("Long Maximum Value = " + Long.MAX_VALUE);
byte thisByte = -38;
short thisShort = 8403;
int thisInt = 2304320;
long thisLong = 50000L + 10L * (thisByte + thisShort + thisInt);
System.out.println("Long result = " + thisLong);
System.out.println();
}
}