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
- Consider the following Java code snippet: import java.util.PriorityQueue; import java.util.Comparator; class Item { int priorit...
- How many participating entities are there in an n-ary relationship where n=5?
- A Python function get_element(arr, index) is supposed to return the element at a given index. def get_element(arr, index): # Assume arr is a list of ...
- What is edge computing in IoT?
- Which TCP feature improves performance specifically over wireless networks where packet loss occurs due to noise, not congestion?
- What is the main advantage of using subword tokenization in NLP?
- A page has 2^12-byte size and a logical address is 32 bits. How many bits identify the page number?
- In datawarehouse , a fact table consist of
- Which of the following algorithm uses Darwinian based algorithm to find the best solutions to solve complicated problems with a greater number of variables...
- What is the purpose of the fork() system call in Unix-based operating systems?
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)