Assertion Reasoning MCQ Questions Answers
Assertion Reasoning MCQ Questions Answers
Assertion: The this keyword in Java refers to the current instance of the class.
Reasoning: The this keyword is a reference to the current object on which a method is being
invoked. It is used to avoid naming conflicts between class attributes and method parameters.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
2.
2. Reasoning: Abstraction allows you to focus on what an object does rather than how it does it. It
helps in managing complexity.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
3.
Reasoning: In Java, polymorphism refers to the hidding the implementation details of an object.,
exposing the only essential details to the user.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
4. Assertion: Inheritance allows a class to inherit the properties and behaviours of another class.
Reasoning: Inheritance is a fundamental OOP concept that promotes code reusability by allowing
one class (subclass) to inherit the attributes and methods of another class (superclass).
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
5. Assertion: Abstraction is the process of hiding the implementation details of an object and
exposing only the relevant features.
Reasoning: Abstraction allows you to focus on what an object does rather than how it does it. It
helps in managing complexity.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
6. Assertion: The static keyword in Java refers to the current instance of the class.
Reasoning: The static keyword is a reference to the current object on which a method is being
invoked. It is used to avoid naming conflicts between class attributes and method parameters.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
7. Assertion: In Java, an object is a blueprint for creating class.
Reasoning: A class defines the properties (fields) and behaviours (methods) that its objects will have.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
8.
Reasoning: When you create a class in Java using the new keyword, you are creating an instance of
an object with its own unique set of attributes.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
9.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
10.
Assertion: A static method in a class can be called without creating an instance of that class.
Reasoning: Static methods belong to the class rather than to any specific instance. They can be
called using the class name.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
11.
Reasoning: In Java, an array can only hold elements of the same data type. If you want to store
different data types, you would need to use an array of objects.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
12.
Reasoning: In Java, array indices are zero-based, meaning the first element is at index 0, the second
element is at index 1, and so on.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
13.
Assertion: In Java, an array is a fixed-size data structure that stores elements of the different data
type.
Reasoning: Arrays provide a contiguous block of memory to hold elements, and the size of an array
is determined at the time of creation.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
14.
Reason 1: Loops provide a way to execute a specific block of code multiple times, saving time and
effort compared to writing out the same code multiple times.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
15.
Assertion 2: There are three main types of loops in Java: for, while, and do-while.
Reason 2: Each type of loop has its own use case. The for loop is useful when you know the number
of iterations in advance. The while loop is suitable for situations where the condition for termination
is known, but the number of iterations may vary. The do-while loop ensures that the code block is
executed at least once, regardless of the condition.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
16.
Assertion 3: Loops can not lead to infinite execution if not properly controlled.
Reason 3: If the condition for loop termination is not met, a loop can run indefinitely, causing the
program to hang or crash. It's crucial to ensure that the loop condition is properly managed to
prevent infinite execution.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
17.
Reason 4: Java allows loops to be nested within each other, which means that you can have one loop
inside another. This is useful for handling multi-dimensional data structures or situations where you
need to perform a series of operations within a loop.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
18.
Reason 1: Java follows the principles of object-oriented programming, which emphasizes the
organization of code around objects that represent real-world entities. This promotes modularity,
reusability, and maintainability of code.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
19.
Reason 2: Encapsulation involves bundling data (attributes) and methods (functions) that operate on
the data within a single unit, known as a class. This allows for better control over access to data and
ensures data integrity.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
20.
Reason 3: Inheritance enables a class (subclass) to inherit attributes and methods from another class
(superclass). This promotes code reuse and allows for the creation of specialized classes that extend
the behaviour of existing ones.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
21.
Reason 4: Polymorphism allows objects to take on different forms or have multiple behaviours. This
is achieved through method overloading and method overriding, enhancing flexibility in code design
and execution.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
22.
Reason 5: Abstraction involves bundling data (attributes) and methods (functions) that operate on
the data within a single unit, known as a class.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
23.
Assertion 7: Java is platform-independent due to its "write once, run anywhere" (WORA) philosophy.
Reason 7: Java bytecode, generated by the Java compiler, can be executed on any platform with a
Java Virtual Machine (JVM). This allows Java programs to run on various operating systems without
modification.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true