Question
The following Java code attempts to demonstrate multiple inheritance, which is not directly supported for classes in Java. How can similar functionality be achieved using interfaces? class A { void methodA() { System.out.println("Method A"); } } class B { void methodB() { System.out.println("Method B"); } } // class C extends A, B { } // Problematic: Multiple inheritance not allowed public class Main { public static void main(String[] args) { // C obj = new C(); } }
More IT Operating System Questions
- What is the time complexity for inserting an element into a binary heap?
- Which password storage technique is considered most secure against rainbow table attacks?
- In a singly linked list, each node typically contains two parts. What are they?
- Complete the Java method to extract a substring from text starting at startIndex and having length characters. public class StringUtil { public Strin...
- fill the blank for 19.
- What is the primary purpose of Apache Hive in the Hadoop ecosystem?
- When designing a class, why is it generally a bad practice to make all fields public?
- Consider the following Java code snippet: import java.util.PriorityQueue; public class HeapQuestion8 { public static void main(Strin...
- Consider the following Java code: import java.util.regex.Matcher; import java.util.regex.Pattern; public class RegexGroup { public static void ...
- What is the recurrence relation for Merge Sort?
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)