Java,Java EE,Open Source

This forum is a soundboard to discuss, brainstorm and share ideas/solution on Java, Java EE and Open source technologies and frameworks
 
HomeHome  ­FAQFAQ  ­SearchSearch  ­MemberlistMemberlist  ­UsergroupsUsergroups  ­RegisterRegister  ­Log inLog in  
Share | 
 

 Dynamic variable in java

View previous topic View next topic Go down 
AuthorMessage
Rajendra007



Posts: 9
Join date: 2009-11-09

PostSubject: Dynamic variable in java   Fri Nov 20, 2009 5:06 am

My interview asked what is dynamic variable in java and where we use them.
Back to top Go down
View user profile
Admin
Admin


Posts: 10
Join date: 2008-10-04

PostSubject: Re: Dynamic variable in java   Tue Dec 01, 2009 3:27 pm

apparently one can't create dynamic vars...use HashMap..e.g.

Map<String, DummyObject> container = new HashMap<String, DummyObject>();

for (int i = 0; i <10; i++)
{

container.put("obj" + i, DummyObject());

}
Back to top Go down
View user profile http://interviewjava.motionsforum.com
 

Dynamic variable in java

View previous topic View next topic Back to top 
Page 1 of 1

Permissions of this forum:You cannot reply to topics in this forum
Java,Java EE,Open Source :: Your first category :: Your first forum-