-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmpDemo.java
More file actions
48 lines (43 loc) · 941 Bytes
/
Copy pathEmpDemo.java
File metadata and controls
48 lines (43 loc) · 941 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
47
48
import java.lang.*;
// import java.util.*;
class Emp
{
String name;
String address;
int id;
void getdata(String name, int id, String address)
{
this.name = name;
this.id = id;
this.address = address;
}
void putdata()
{
System.out.println("Employee details:");
System.out.println("Employee name="+name);
System.out.println("Employee Id="+id);
System.out.println("Employee address="+address);
}
}
class EmpDemp
{
public static void main(String args[])
{
Emp e=new Emp();
// Scanner sc = new Scanner(System.in);
// int i;
// // i for id
// String n,a;
// // n for name
// // a for address
// System.out.println("Enter name of Employee=");
// n=sc.next();
// System.out.println("Enter id=");
// i=sc.nextInt();
// System.out.println("Enter address=");
// a=sc.next();
//e.getdata(n,i,a);
e.getdata("jay",15870,"mumbai");
e.putdata();
}
}