Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package task10;
- class Employee {
- String name;
- int Joining_Year,salary;
- String address;
- }
- public class Task10 {
- public static void main(String[] args) {
- Employee E1 = new Employee();
- E1.name = "Robert";
- E1.Joining_Year = 1994;
- E1.address = "64C- WallsStreat";
- Employee E2 = new Employee();
- E2.name = "Sam";
- E2.Joining_Year = 2000;
- E2.address = "68D- WallsStreat";
- Employee E3 = new Employee();
- E3.name = "John";
- E3.Joining_Year = 1999;
- E3.address = "26B- WallsStreat";
- System.out.println("a. Name Year of joining Address ");
- System.out.println("b. "+E1.name+" "+E1.Joining_Year +" "+E1.address);
- System.out.println("c. "+E2.name+" "+E2.Joining_Year +" "+E2.address);
- System.out.println("d. "+E3.name+" "+E3.Joining_Year +" "+E3.address);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment