Object Oriented Programming (OOPs)

© examsiri.com
Question : 53 of 72
 
Marks: +1, -0
Given classes defined in two different files:
1. package packageA;
2. public class Message {
3.   String getText() { return "text"; }
4. }
and:
1. package packageB;
2. public class XMLMessage extends packageA.Message {
3.   String getText() { return "text";}
4.   public static void main(String[] args) {
5.    System.out.println(new XMLMessage().getText());
6.   }
7. }

What is the result of executing XMLMessage.main?
Go to Question: