-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest.java
More file actions
51 lines (42 loc) · 1.21 KB
/
Test.java
File metadata and controls
51 lines (42 loc) · 1.21 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
48
49
50
51
// OOP + API
public class Test {
public static void main(String[] args) {
// ram is a instance of Employee Class
// shyam ref var + local var + object
Employee shyam = new Employee(1001, "Shyam", 9999);
// shyam = new Employee();
shyam.print();
System.out.println("****************************8");
Employee ram = new Employee(1002, "Ram", 7777);
ram.print();
/*
* shyam.id = -1001; shyam.name=" "; shyam.salary=-9000;
*/
// shyam.takeInput(111, "Shyam", 9090);
/*
* System.out.println("*********************************");
*
* Employee ram = new Employee(); ram.takeInput(1001, "Ram", 5454);
* ram.print();
*/
/*
* shyam.id = 111; shyam.name = "Shyam"; shyam.salary= 9009.0;
*/
/*
* System.out.println("Id "+ram.id);
* System.out.println("Name "+ram.name);
* System.out.println("Salary "+ram.salary);
*/
/*
* ram.id = 191; ram.name="Ram Kumar"; ram.salary= 9090;
* System.out.println("***********************************");
* ram.print();
*//*
* System.out.println("Id "+ram.id);
* System.out.println("Name "+ram.name);
* System.out.println("Salary "+ram.salary);
*/
// int x = 200;
// System.out.println("Hello Java");
}
}