Java 8
Java 8
Using the NetBeans debugger, you can set breakpoints and trace through a program one line at
a time.
(1) Points
True (*)
False
Correct
(1) Points
True (*)
False
Correct
(1) Points
True (*)
False
4. An exception is an error that occurs during the execution of a program at run-time that disrupts
the normal flow of the Java program.
(1) Points
True (*)
False
Correct
5. If the try block succeeds then no exception has occurred.
(1) Points
True (*)
False
Correct
int b = 0;
try{
System.out.println("1");
System.out.println("2");
catch(Exception ex){
System.out.println(ex.toString());
(1) Points
The details of the Exception object ex are too general to be useful. (*)
Correct
iterator
ListIterator
for-each loop
Correct
(1) Points
You can use an ArrayList list to store Java primitive values (like int). (*)
(1) Points
True (*)
False
Correct
(1) Points
0 (*)
It depends on the type of the array.
11. You can access the size of any array by using the array’s “length” property.
(1) Points
True (*)
False
System.out.print("hai ");
(1) Points
12
hai
Correct
13. The Java compiler does not check for an ArrayIndexOutOfBoundsException during the
compilation of a program containing arrays.
(1) Points
True (*)
False
Correct
14. Arrays are like variables which must be declared prior to use.
(1) Points
True (*)
False
Correct
arr[0] = 10;
System.out.println(arr[0]);
(1) Points
ArrayIndexOutOfBoundsException
10 (*)
Correct