Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. public class MyObjectChild extends MyObject {
  2.  
  3. int id;
  4. string name;
  5. static List <MyObject> staticList = new ArrayList<>();
  6. static String jsonStaticList = null;
  7.  
  8.  
  9.  
  10. @Override
  11. public void addToList () {
  12.  
  13. List<MyObject> list = new ArrayList<>();
  14.  
  15. try {
  16. list.add(this);
  17. } catch (Exception e){
  18. Log.e("error", "Didn’t add MyObject to the methodList "); }
  19.  
  20. try {
  21. staticList.add(this);
  22. } catch (Exception e){
  23. Log.e("error", "Didn’t add MyObject to the staticList"); }
  24. }
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement