Java.util.Map
Java.util.List
Java.util.Set
Java.util.Collection
Float fa = new float[20];
Char[ ] ca = "Some String";
Int[ ] ia = new int[15];
Int ia[ ] [ ] = { 4, 5, 6 }, { 1,2,3 };
The value returned by hashcode() is used in some collection classes to help locate objects.
The hashcode() method is required to return a positive int value.
The hashcode() method in the String class is the one inherited from Object.
Two new empty String objects will produce identical hashcodes.
0
1
2
3
0
10
5
1
String s1 = null;
String s2 = new String("JavaStuff");
String s3 = "JavaStuff"
String s4 = (String) 'JavaStuff';
DBC
DB
BD
Compilation fails
Yes
No
Any statement that can throw an Exception must be enclosed in a try block.
Any statement that can throw an Error must be enclosed in a try block.
The Error class is a RuntimeException.
Catch(X x) can catch subclasses of X where X is a subclass of Exception.
Run();
Main();
Start();
Stop();
Quiz Review Timeline +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.