I am working on creating some Hashmaps in different ways. I am stuck at one place now. I assigned some values to an object and pass that object as value to Hashmap with the key as student. And not knowing how to retrieve those values.
Please Help!
Here is the code I wrote:
StudentHashMap stud=new StudentHashMap();//creating class object
stud.firstName="Santhosh";//Assigning values to object
stud.lastName="Nellutla";
stud.rollNumber=1;
HashMap studentMap=new HashMap();// creating HashMap object
studentMap.put("Student", stud);
stud.studentDetails(studentMap);

New Topic/Question
Reply





MultiQuote







|