Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

Β 

History

History
History
65 lines (50 loc) Β· 1.87 KB

File metadata and controls

65 lines (50 loc) Β· 1.87 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package practice;
import java.lang.*;
public class DataSizeRange {
public static void main(String... args) {
System.out.println("Min range of int is: " + Integer.MIN_VALUE);
System.out.println("Max range of int is: " + Integer.MAX_VALUE);
System.out.println("size of int in Bytes is: " + Integer.BYTES);
/*
* note: use below command in cmd prompt to see all classes
* javap java.lang.Integer
* javap java.lang.Byte
* javap java.lang.Character
* javap java.lang.Short
* javap java.lang Float
*/
System.out.println();
System.out.println("Min range of char is: " + (int) Character.MIN_VALUE);
System.out.println("Max range of char is: " + (int) Character.MAX_VALUE);
System.out.println("size of char in Bytes is: " + Character.BYTES);
System.out.println();
System.out.println("Min range of float is: " + Float.MIN_VALUE);
System.out.println("Max range of float is: " + Float.MAX_VALUE);
System.out.println("size of float in Bytes is: " + Float.BYTES);
System.out.println();
System.out.println("Min range of short is: " + Short.MIN_VALUE);
System.out.println("Max range of short is: " + Short.MAX_VALUE);
System.out.println("size of short in Bytes is: " + Short.BYTES);
System.out.println();
System.out.println("Min range of byte is: " + Byte.MIN_VALUE);
System.out.println("Max range of byte is: " + Byte.MAX_VALUE);
System.out.println("size of byte in Bytes is: " + Byte.BYTES);
}
}
/* output:
Min range of int is: -2147483648
Max range of int is: 2147483647
size of int in Bytes is: 4
Min range of char is: 0
Max range of char is: 65535
size of char in Bytes is: 2
Min range of float is: 1.4E-45
Max range of float is: 3.4028235E38
size of float in Bytes is: 4
Min range of short is: -32768
Max range of short is: 32767
size of short in Bytes is: 2
Min range of byte is: -128
Max range of byte is: 127
size of byte in Bytes is: 1
*/
Morty Proxy This is a proxified and sanitized view of the page, visit original site.