how to pass args to an object array?
I am very new at java and in route for a lot of headaches. I'm trying to write a small Geo quiz program that will define countries as objects (the variables will be cities, language, presidents, etc..) and quiz the user.
Well I've spent 2 days looking and snooping around and I still can't figure out how to build an array of objects the same way I do it with String.
This is my approach:
1> I've created an object Country() representated as Country(String A, String B, String C, StringD) where A,B,C,D are city, language, money and pdt. it works fine.
2> Build 20 countries on that model:
Country A =new Country ("Australia","Sydney","Dollar");
Country B =new Country("Bolivia","La Paz","Dinero");
Country T =new Country("Texas","Austin","Dollar); and so on
3> now I create an array to put 20 countries in and quiz the user:
Country myList = new Country;
and that's where my problem is.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center