- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlab_program_1.java
More file actions
Latest commit
80 lines (78 loc) · 1.87 KB
/
Copy pathlab_program_1.java
File metadata and controls
80 lines (78 loc) · 1.87 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
publicclasslab_program_1
{
// public static class Student
// {
// String Name;
// int age;
// void display(String x,int y)
// {
// Name=x;
// age=y;
// System.out.println("Name of the student is:"+Name);
// System.out.println("Age is:"+age);
// }
//
// }
// public static class Employee
// {
// String emp_name;
// int Sal;
//
// void display(String a,int b)
// {
// emp_name=a;
// Sal=b;
// System.out.println("The Name ot the employee is:"+emp_name);
// System.out.println("The salary of the employee is:"+Sal);
// }
//
// }
//// public static void main(String[] args) {
//
////
////
//// }
//
// public static class Employee1
// {
// static String name="Meet";
// static int emp_id=200;
// int emp_count=500;
// static class department
// {
// public void show()
// {
// System.out.println("employee id is:"+emp_id);
// }
// }
// }
//
// public static void main(String[] args) {
// Employee1.department e1=new Employee1.department();
// e1.show();
// Student s1=new Student();
// Employee e=new Employee();
//
//
// s1.display("Meet",19);
// e.display("Mlon Eusk",100000);
// }
publicstaticclassStudent
{
publicStudent(StringName,intage)
{
System.out.println("The name of the student is:"+Name);
System.out.println("The age of the Student is:"+age);
}
intstd_id;
voiddisp(intx)
{
std_id=x;
System.out.println("Student id is:"+std_id);
}
}
publicstaticvoidmain(String[] args) {
Students1=newStudent("Meet",19);
s1.disp(31);
}
}