Advertisement
Guest User

Untitled

a guest
Sep 1st, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.72 KB | None | 0 0
  1. public class Person {
  2.     private final String firstName;
  3.     private final String lastName;
  4.     private final String city;
  5.     private final int age;
  6.    
  7.     @Autowired
  8.     private final DevicesService devicesService; //It will not work
  9.    
  10.     public Person(String firstName, String lastName, String city, int age) {
  11.         this.firstName = firstName;
  12.         this.lastName = lastName;
  13.         this.city = city;
  14.         this.age = age;
  15.     }
  16.    
  17.     public String getFirstName() {
  18.         return firstName;
  19.     }
  20.    
  21.     public String getLastName() {
  22.         return lastName;
  23.     }
  24.    
  25.     public String getCity() {
  26.         return city;
  27.     }
  28.    
  29.     public int getAge() {
  30.         return age;
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement