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
- In an operating system's process scheduling, which data structure is typically used to manage processes waiting for CPU time, ensuring they are executed in...
- Which virtualization technique allows the guest OS to run without being modified and has the lowest overhead?
- Consider the following Java code: import java.util.Arrays; public class Splitter { public static void main(String[] args) { String data...
- Predict the output list1 = ['physics', 'chemistry', 1997, 2000] list2 = [1, 2, 3, 4, 5, 6, 7 ] print "list1[0]: ", list1[0]
- Which sorting algorithm picks up an element and places it in its correct place?
- What is the primary purpose of a system call?
- What is the cardinality of the set {1,2,3,5,4} ?
- What is the purpose of the CASE statement in SQL?
- Which of the following statements about a MAC (Media Access Control) address is correct?
- In a program with multiple conditional statements (if-else if-else), understanding the code flow involves determining:
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