Question
What will be the output of the following Java snippet? class A { public void display() { System.out.println("Class A"); }} class B extends A { public void display() { System.out.println("Class B"); }} public class Test { public static void main(String[] args) { A obj = new B(); obj.display(); }}
More Data Structure Questions
- What is the result of evaluating the following prefix expression using a stack-based evaluation: * + 2 3 - 8 4
- Best case complexity of insertion sort is:
- Which of the following accurately describes the role of virtual memory in modern operating systems?
- Quicksort is applied to an already-sorted array of size n, always choosing the first element as the pivot. What is the time complexity of this scenario?
- Quick Sort achieves its best-case time complexity of O(n log n) under which of the following pivot selection conditions?
- What is the worst-case time complexity of the Bubble Sort algorithm?
- Which SOLID principle emphasizes that a class should have only one reason to change?
- In asymmetric encryption, which of the following statements is correct?
- What is a 'linked list' and how does it differ from an array?
- What is the worst-case time complexity of the QuickSort algorithm?
Hey! Ask a query
Please enter email id
The email must be a valid email address.
Please enter Mobile Number
Please enter valid Mobile Number
Please enter your Doubt
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
- 200 Questions with Detailed Solutions
- Section-wise Coverage (GA, English, Quant & Reasoning)