Quiz 9
Quiz 9
Choose which opcode is used to push an int constant 5 onto the operand
stack.
Mark for Review
(1) Points
iconst_5 (*)
idc5
iload_5
iaload_5
iinc5
Correct
2. Choose which opcode is used to load an int from the local variable to the
operand stack.
Mark for Review
(1) Points
aload
iload (*)
iaload
iconst
Correct
(1) Points
True (*)
False
Correct
(1) Points
The JVM offers a secure environment to run a Java application
Bytecode is not portable, and needs to be compiled again in order to run on
a different platform. (*)
This study source was downloaded by 100000770888135 from CourseHero.com on 11-26-2024 17:10:52 GMT -06:00
https://www.coursehero.com/file/89525277/Quiz-9docx/
The JVM can interpret bytecode.
Once Java source code is compiled, it converts to bytecode.
Correct
(1) Points
True (*)
False
Correct
6. Which of the following opcode instructions would add 2 integer variables?
Mark for Review
(1) Points
add
+
addi
iadd (*)
Incorrect. Refer to Section 9 Lesson 1.
7. In the ClassLoader hierarchy, which of the following is the only class loader
that does NOT have a parent?
Mark for Review
(1) Points
custom class loader
application class loader
bootstrap class loader (*)
extension class loader
Correct
8. Which of the following from ClassLoader will load the rt.jar, the Java core
clsses which are present in the java.* package?
Mark for Review
(1) Points
Extension Class Loader
This study source was downloaded by 100000770888135 from CourseHero.com on 11-26-2024 17:10:52 GMT -06:00
https://www.coursehero.com/file/89525277/Quiz-9docx/
Custom Class Loader
Bootstrap Class Loader (*)
Application Class Loader
Correct
(1) Points
verification class loader (*)
application class loader
bootstrap class loader
extension class loader
Correct
(1) Points
The forName() method does not initialize the HelloClass. (*)
The forName() method returns the Class object associated with the
HelloClass.
The forName() method does not load the HelloClas class into the Java
Runtime. (*)
In this example, the Class.forName("HelloClass") will use the ClassLoader
which loads the Foo class.
The forName method will instantiate a HelloClass object. (*)
Correct
Previous
11. The Java developer can define a number of additional or custom
classloaders.
This study source was downloaded by 100000770888135 from CourseHero.com on 11-26-2024 17:10:52 GMT -06:00
https://www.coursehero.com/file/89525277/Quiz-9docx/
Mark for Review
(1) Points
True (*)
False
Correct
12. .class files are loaded into memory all at once, when a Java application is
launched.
Mark for Review
(1) Points
True
False (*)
Correct
(1) Points
verification
preparation
resolution
All of the above (*)
Correct
14. The same class cannot be loaded by the JVM more than one time.
Mark for Review
(1) Points
True (*)
False
Correct
(1) Points
This study source was downloaded by 100000770888135 from CourseHero.com on 11-26-2024 17:10:52 GMT -06:00
https://www.coursehero.com/file/89525277/Quiz-9docx/
IOException
SystemException
ClassFormatError
ClassNotFoundException (*)
Correct
Previous
This study source was downloaded by 100000770888135 from CourseHero.com on 11-26-2024 17:10:52 GMT -06:00
https://www.coursehero.com/file/89525277/Quiz-9docx/
Powered by TCPDF (www.tcpdf.org)