Question

What does the following Java code snippet demonstrate? class Animal {     void sound() { System.out.println("Some sound"); } } class Dog extends Animal {     void sound() { System.out.println("Bark"); } }

A Abstraction
B Encapsulation
C Method Overloading
D Method Overriding
E Constructor Chaining
Practice Next

Relevant for Exams:

Hey! Ask a query

🎓
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)