Question

What happens when you try to compile the following code?     abstract class Shape {         abstract void draw();     }     public class Test {         public static void main(String[] args) {             Shape s = new Shape();         }     }

A Compiles and runs fine
B Compilation error — missing draw() implementation only
C Runtime exception
D Compiles but prints nothing
E Compilation error — cannot instantiate abstract class
Practice Next

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)