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
- In network architecture, what is the primary advantage of a mesh topology over a star topology?
- Deletion in Red-Black Tree may require:
- During AVL tree insertion, a node becomes unbalanced with a balance factor of +2, and its right child has a balance factor of -1. Which rotation restores t...
- Which OSI model layer is responsible for reliable delivery of data between devices?
- Which data structure is used in BFS traversal of graphs?
- Which of the following is a good practice when debugging?
- What does "Big O notation" primarily describe about an algorithm?
- Which SOLID principle ensures that a class has only one reason to change?
- A directed graph has V vertices and E edges. Using adjacency lists, what is the time complexity of BFS when each vertex is enqueued at most once?
- Which of the following is NOT among the OWASP Top 10 Web Security Risks?
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)