SHARE
TWEET

Untitled

a guest Jun 18th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class DTA {
  2.   private String id;
  3.   private String age;
  4.  
  5.   @Override
  6.   public String toString() {
  7.     return "DTA{" +
  8.             "id='" + id + ''' +
  9.             ", age='" + age + ''' +
  10.             '}';
  11.   }
  12.  
  13.   public DTA(String id, String age) {
  14.     this.id = id;
  15.     this.age = age;
  16.   }
  17.  
  18.   public String getId() {
  19.     return id;
  20.   }
  21.  
  22.   public void setId(String id) {
  23.     this.id = id;
  24.   }
  25.  
  26.   public String getAge() {
  27.     return age;
  28.   }
  29.  
  30.   public void setAge(String age) {
  31.     this.age = age;
  32.   }
  33. }
  34.      
  35. List<DTA> listA = new ArrayList<>();
  36. listA.add(new DTA("A", "15"));
  37. listA.add(new DTA("B", "25"));
  38.      
  39. List<? extends Map<String, String>>
  40.  
  41. List(Map("id"->"A", "age"->"15"), Map("id"->"B", "age"->"25"))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top