I think you can look at this.
http://www.cs.usfca.ed u/~parrt/course/601/lectures/io.html...
User Profile
Collapse
-
Class Instance
Hello,
I have been trying to instantiate a class dynamically within a loop. I have this code:
for(int m=1;m<5;m++){
mystring = Integer.toStrin g(m);
String b2 = "myobservation" +mystring;
Observation ob = (Observation)b2 ;
System.out.prin tln(ob);
}
where Observation is the class I want to instantiate. All I want to do...
No activity results to display
Show More
Leave a comment: