import java.util.*; public class Test { public static void main(String[] args) { List ids = new ArrayList(); // Line 1 ids.add(123); ids.add(999); Map students = new HashMap(); // Line 2 students.put("Jess",ids.get(0)); students.put("Jimmy",ids.get(1)); int x = ((Long)students.get("Jimmy")).intValue(); // Line 3 } }
public class Test {
public static void main(String[] args) {
List ids = new ArrayList(); // Line 1
ids.add(123);
ids.add(999);
Map students = new HashMap(); // Line 2
students.put("Jess",ids.get(0));
students.put("Jimmy",ids.get(1));
int x = ((Long)students.get("Jimmy")).intValue(); // Line 3
}
Oracle Certified Professional Java Programmer
Access: Public Instant Grading
Jobilize.com uses cookies to ensure that you get the best experience. By continuing to use Jobilize.com web-site, you agree to the Terms of Use.