-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConst.java
More file actions
46 lines (36 loc) · 695 Bytes
/
Const.java
File metadata and controls
46 lines (36 loc) · 695 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
34
35
36
37
38
39
40
41
42
43
44
45
46
class MainEmployee
{
public MainEmployee()
{
int id=54;
String name="Saud ahmed";
}
private int id;
private String name;
public String getName()
{
return name;
}
public void setName(String n)
{
this.name=n;
}
public void setid(int i)
{
this.id=i;
}
public int getid()
{
return id;
}
}
public class Const {
public static void main(String[] args)
{
MainEmployee me=new MainEmployee();
me.setName("Saud ahmed");
me.setid(54);
System.out.println(me.getid());
System.out.println(me.getName());
}
}