Q.- Given the content of the Customer.java and Trader.java files:-
package sales;
public class Customer {
public void m1 ( ) { }
private void m2 ( ) { }
protected void m3 ( ) { }
void m4 ( ) { }
}
package market;
import sales. *;
public class Trader extends Customer { }
Which two methods can be overridden in the Trader class from the Customer class?
A) m2 ( )
B) m4 ( )
C) m1 ( )
D) m3( )
⧪ please give your answer in a comment section.
package sales;
public class Customer {
public void m1 ( ) { }
private void m2 ( ) { }
protected void m3 ( ) { }
void m4 ( ) { }
}
package market;
import sales. *;
public class Trader extends Customer { }
Which two methods can be overridden in the Trader class from the Customer class?
A) m2 ( )
B) m4 ( )
C) m1 ( )
D) m3( )
⧪ please give your answer in a comment section.
7 Comments
Option C
ReplyDeleteC
ReplyDeleteC D
ReplyDeleteC D
ReplyDeleteC D
ReplyDeleteC D
ReplyDeleteCd
ReplyDelete