Question
What is the output of the following code? class Parent { void show() { System.out.println("Parent"); } } class Child extends Parent { void show() { System.out.println("Child"); } } public class Test { public static void main(String[] args) { Parent p = new Child(); p.show(); } }
More IT Operating System Questions
- Which statement is FALSE regarding DRAM memory?
- Malicious software is known as :
- Which is used for C shell?
- Complete the Python code snippet to initialize an array arr of size N with all zeros, and then iterate through it from the second element (index 1) up to, ...
- What is the primary goal of abstraction in computer science?
- Kernel is :
- A system has cache access time 5 ns, main memory access time 100 ns, and a cache hit ratio of 0.9. Using AAT = h·Tc + (1-h)·Tm, what is the average memory ...
- MIS is a type of:
- What happens if a subclass does not explicitly call a superclass constructor?
- int i=10; float f=i; What kind of typecasting is happening in the above scenario?
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)