How to iterate map in collection framework?
Answer / navin kumar
Map<String,String> map = new HashMap<String,String>();
map.put("A","Rohan");
map.put("C","Sohan");
map.put("B","Ram");
for(String key : map.entrySet()){
sop(key);//A,C and B as key
sop(map.get(key))//Rohan,Sohan and Ram as values
}
| Is This Answer Correct ? | 0 Yes | 0 No |
How to Create a New Table?
Come up with an algorithm to shuffle a deck of cards. Discuss how uniform a distribution your solution would achieve, and how you could potentially improve upon it.
You're developing a boss encounter in a 3D platformer game, and the boss has 15 different attacks. The game designers have asked you to make sure that the player sees as many of those 15 attacks as possible during the encounter, and that he seldom or never sees the same attack twice in a row. What are some ways you can do this? What does the attack selection algorithm look like in this case? Keep in mind that not all attacks are possible all the time -- for example, the boss has a melee attack that he can only do when the player is very close, and a bombardment attack he can only do when the player is far away.
You're in charge of implementing a stealth game similar to Thief: The Dark Project, and you need guards in your game that have imperfect vision and hearing and inhabit dimly-lit castles, and they can search the area for the player if they think there's an intruder around. How do you model the sensory systems of these guards, and how do you aggregate auditory, visual, and other kinds of stimuli in this system? How do you implement the various alert states for the guards, and why?
What are the Issues faced while creating Delivery & Shipment Execution?
If selling price is doubled, the profit triples. Find the profit percent
How to iterate map in collection framework?
pls suggest me a good institute for SAP-MM in Pune
WAP to display "I LOVE MY COUNTRY " without any space
How to Access a Database?
Compare two strings character by character in qtp
what is extern
Software (196882)
Sciences (12521)
Engineering (38019)
Business Management (7371)
Accounting (11552)
Advertising Media (662)
Architecture Design (207)
Call Centre (2482)
Fashion Modelling (332)
Government (17383)
Law (806)
Tourism Hotel (377)
Everything Else (2323)
Military Police (160)
Skills Abilities (0)
Aptitude Questions (4307)
Placement Papers (705)
Certifications (3752)
Visa Interview Questions (2230)
Code Snippets (1098)
Entrance Exams (862)
ERRORS (16636)