Jvm Architecture Questionnaire_27 June

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By James Richardson
J
James Richardson
Community Contributor
Quizzes Created: 13 | Total Attempts: 10,842
Questions: 10 | Attempts: 173

SettingsSettingsSettings
Java Quizzes & Trivia

Questions and Answers
  • 1. 

     One word should be sufficient enough to hold –

    • A.

      Int

    • B.

      Long

    • C.

      ReturnAddress

    • D.

      All of above

    Correct Answer(s)
    A. Int
    C. ReturnAddress
    Explanation
    The given correct answer includes two options: "int" and "returnAddress". "int" is a data type in programming that is used to store integer values. "returnAddress" is a term that refers to the memory location where a program should return after executing a function or subroutine. Therefore, both "int" and "returnAddress" are valid options that can hold data in programming. The option "long" is not included in the correct answer.

    Rate this question:

  • 2. 

    Which of the following run-time data areas are shared across threads?

    • A.

      Method Area

    • B.

      Heap

    • C.

      Java Stack

    • D.

      All of Above

    Correct Answer(s)
    A. Method Area
    B. Heap
    Explanation
    The Method Area and Heap are the run-time data areas that are shared across threads. The Method Area stores the class structures, method code, and static variables, which are common to all threads. The Heap is used for dynamic memory allocation, and it is also shared among threads. The Java Stack, on the other hand, is not shared across threads. Each thread has its own Java Stack, which is used for storing local variables and method call information. Therefore, the correct answer is Method Area and Heap.

    Rate this question:

  • 3. 

     In a memory rich JVM implementation, Method Tables would exist for –

    • A.

      Interfaces

    • B.

      Concrete Classes

    • C.

      Abstract Classes

    • D.

      All of Above

    Correct Answer
    B. Concrete Classes
    Explanation
    In a memory rich JVM implementation, Method Tables would exist for Concrete Classes. Method tables are data structures used by the JVM to store information about methods in a class. Concrete classes are the actual implementation classes that provide specific behavior and can be instantiated, so they require method tables to store information about their methods. Interfaces and abstract classes, on the other hand, do not have concrete implementations and cannot be instantiated, so they do not have method tables.

    Rate this question:

  • 4. 

     What would be the class name for a Double Dimensional Boolean array?

    • A.

      [[B

    • B.

      [[java.lang.Boolean

    • C.

      [[Ljava.lang.Boolean

    • D.

      None of these

    Correct Answer
    C. [[Ljava.lang.Boolean
    Explanation
    The class name for a Double Dimensional Boolean array would be [[Ljava.lang.Boolean. This is because the array is a double dimensional array, indicated by the two sets of square brackets. The "L" indicates that it is a reference type, and "java.lang.Boolean" specifies the class of the elements in the array.

    Rate this question:

  • 5. 

    Which of the following can be stored directly on Stack Frames?

    • A.

      ReturnAddress

    • B.

      Reference

    • C.

      Int

    • D.

      Short

    Correct Answer(s)
    B. Reference
    C. Int
    Explanation
    In computer programming, stack frames are used to store local variables and function call information. The return address is typically stored on the stack frame to keep track of where to return after a function call. References and integers can also be directly stored on stack frames as they are simple data types that can be easily allocated and deallocated from the stack. However, short is a data type that requires more memory than a single stack frame can provide, so it cannot be directly stored on stack frames.

    Rate this question:

  • 6. 

    Constants (static final variables) are stored in the method Area of –

    • A.

      The Type that declares them

    • B.

      The Types that uses them

    • C.

      Both a & b

    • D.

      None of these

    Correct Answer
    C. Both a & b
    Explanation
    Constants (static final variables) are stored in both the Type that declares them and the Types that use them. When a constant is declared in a class, it is stored in the memory allocated for that class. This allows other methods within the class to access the constant. Additionally, when other classes use the constant, a copy of it is stored in their respective memory allocation. This ensures that the constant can be accessed and used by multiple classes without any conflicts or dependencies on the declaring class. Therefore, the correct answer is both a and b.

    Rate this question:

  • 7. 

    By default the following Class Loader(s) is/are present in any running Java application version 1.2 onwards –

    • A.

      BootStrap Class Loader

    • B.

      Standard Extension Class Loader

    • C.

      Class Path Class Loader

    • D.

      All of the above

    Correct Answer(s)
    A. BootStrap Class Loader
    C. Class Path Class Loader
    Explanation
    The correct answer is BootStrap Class Loader and Class Path Class Loader. In any running Java application version 1.2 onwards, the BootStrap Class Loader is responsible for loading core Java classes from the bootstrap classpath. The Class Path Class Loader, on the other hand, is responsible for loading classes from the classpath specified by the CLASSPATH environment variable or the -classpath command-line option. Therefore, both of these class loaders are present in any running Java application.

    Rate this question:

  • 8. 

     Which of the following are true about Class Loaders –

    • A.

      Guards the border of trusted Class

    • B.

      There is one namespace per ClassLoader Libraries.

    • C.

      Works in Parent Delegation model from version 1.2 onwards.

    • D.

      Classpath Classloader is allowed to load a class java.lang.Virus.

    Correct Answer(s)
    A. Guards the border of trusted Class
    B. There is one namespace per ClassLoader Libraries.
    C. Works in Parent Delegation model from version 1.2 onwards.
    Explanation
    Class Loaders guard the border of trusted Class, meaning they control the loading of classes and ensure that only trusted classes are loaded into the JVM. There is one namespace per ClassLoader Libraries, which means that classes loaded by different class loaders do not conflict with each other. Class Loaders work in the Parent Delegation model from version 1.2 onwards, which means that before loading a class, the class loader will first delegate the task to its parent class loader. The statement "Classpath Classloader is allowed to load a class java.lang.Virus" is not true as the Classpath Classloader does not have the authority to load classes from the java.lang package.

    Rate this question:

  • 9. 

    Code signing & authentication mechanism allow us to have fine grained security policies.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    Code signing and authentication mechanisms provide a way to verify the integrity and authenticity of software. By digitally signing code, it ensures that the code has not been tampered with and comes from a trusted source. This allows for the implementation of fine-grained security policies, as the system can validate the signatures and enforce specific access controls based on the trust level of the signer. Therefore, the statement that code signing and authentication mechanisms allow for fine-grained security policies is true.

    Rate this question:

  • 10. 

     Which of the following are verified in the Pass Two of Class File Verifier?

    • A.

      Method Descriptors

    • B.

      Some of the Java language rules

    • C.

      Data flow analysis

    • D.

      Method’s bytecode verification.

    Correct Answer(s)
    A. Method Descriptors
    B. Some of the Java language rules
    Explanation
    In the Pass Two of Class File Verifier, the method descriptors and some of the Java language rules are verified. Method descriptors provide information about the parameters and return type of a method, ensuring that they are correctly defined. The verification of some Java language rules ensures that the code follows the syntax and semantics of the Java language. These verifications help ensure the integrity and correctness of the bytecode and prevent potential runtime errors.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 19, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jun 26, 2013
    Quiz Created by
    James Richardson
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.