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 primary goal of the OWASP Top 10 project?
- Which of the following is the most critical success factor for the implementation of a Decision Support System (DSS) within an organization?
- What is the maximum number of nodes in a binary tree of height 'h' (where root is at height 0)?
- Which attack can be mitigated using DNSSEC (Domain Name System Security Extensions)?
- In a graph, what is the maximum number of edges in a simple undirected graph with 'n' vertices?
- In the dynamic programming approach for LCS, the base cases are crucial for correctly initializing the dp table. Consider the following Python code snip...
- Which CPU scheduling algorithm always selects the process with the smallest burst time first, potentially leading to starvation?
- Which of the following is a primary advantage of using a star schema in a data warehouse design?
- For Dijkstra’s algorithm on a graph with non-negative weights, which data structure yields the best time complexity for dense graphs?
- Which of the following is a disadvantage of using arrays?
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