forked from natural/java2python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBasicTypes2.java
More file actions
33 lines (22 loc) · 599 Bytes
/
BasicTypes2.java
File metadata and controls
33 lines (22 loc) · 599 Bytes
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
class BasicTypes2 {
public static void main(String[] args) {
Integer I = 32;
System.out.println(I);
Boolean B = true;
System.out.println( B ? "ok" : "nope" );
Byte Y = 0;
System.out.println(Y);
Character C = 'c';
System.out.println(C);
Short S = 128;
System.out.println(S);
Long L = 128L;
System.out.println(L);
Float F = 1.5F;
System.out.println(F);
Double D = 1.5;
System.out.println(D);
String T = "done";
System.out.println(T);
}
}