mobilefish

Untitled

Sep 15th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.82 KB | None | 0 0
  1. package com.techm.bm;
  2. import java.io.Serializable;
  3.  
  4. class Employee implements Serializable{
  5.     public String id;
  6.     public String firstName;
  7.     public String lastName;
  8.    
  9.    
  10.     public Employee(){
  11.     }
  12.    
  13.     public Employee(String id, String firstName, String lastName) {
  14.         this.id = id;
  15.         this.firstName = firstName;
  16.         this.lastName = lastName;
  17.     }
  18.    
  19.    
  20.     String getFirstName(){
  21.         return firstName;
  22.     }
  23.    
  24.     String getLastName(){
  25.         return lastName;
  26.     }
  27.    
  28.     void setFirstName(String firstName){
  29.         this.firstName=firstName;
  30.     }
  31.    
  32.     void setLastName(String lastName){
  33.         this.lastName=lastName;
  34.     }
  35.    
  36.     String getId(){
  37.         return id;
  38.     }
  39.    
  40.     void setId(String id){
  41.         this.id=id;
  42.     }
  43.    
  44.     @Override
  45.     public String toString() {
  46.         return "Employee [id=" + id + ", firstName=" + firstName + ", lastName=" + lastName
  47.                 + "]";
  48.     }
  49.    
  50.    
  51. }
Add Comment
Please, Sign In to add comment