how to use simple getter and setter with android
I have a class country with an arraylist that stores countries. I have created a get and set to add and get items from specified indexes from the array list but i wont work. Whenever i call an index from the arraylist i get an out of bounds exception because the array is empty or at least seems to be. public class country extends Application { public ArrayList<country> countryList = new ArrayList<country>(); public String Name; public String Code; public String ID; public country() { } public country(String name, String id, String code) { this.Name = name; this.ID = id; this.Code = code; } pub
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.