-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathabc.java
More file actions
47 lines (43 loc) · 1.19 KB
/
abc.java
File metadata and controls
47 lines (43 loc) · 1.19 KB
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
import java.util.*;
public class abc {
boolean a;
byte f;
short g;
int d;
long e;
float c;
double b;
char h;
void Display() {
System.out.println("Default values:");
System.out.println("boolean = " + a);
System.out.println("double = " + b);
System.out.println("float= " + c);
System.out.println("int = " + d);
System.out.println("long = " + e);
System.out.println("byte = " + f);
System.out.println("short = " + g);
System.out.println("char= " + h);
a=true;
b=5.0;
c=8.0f;
d=9;
e=7l;
f=2;
g=3;
h='h';
System.out.println("After initialization:");
System.out.println("boolean = " + a);
System.out.println("double = " + b);
System.out.println("float= " + c);
System.out.println("int = " + d);
System.out.println("long = " + e);
System.out.println("byte = " + f);
System.out.println("short = " + g);
System.out.println("char= " + h);
}
public static void main(String[] args) {
abc d = new abc();
d.Display();
}
}