Set - 5

Question 11 :

Can an anonymous class be declared as implementing an interface and extending a class?

Answer :

An anonymous class may implement an interface or extend a superclass, but may not be declared to do both.


Question 12 :

What is the range of the short type?

Answer :

The range of the short type is -(2^15) to 2^15 - 1.


Question 13 :

What is the range of the char type?

Answer :

The range of the char type is 0 to 2^16 - 1.


Question 14 :

In which package are most of the AWT events that support the event-delegation model defined?

Answer :

Most of the AWT-related events of the event-delegation model are defined in the java.awt.event package. The AWTEvent class is defined in the java.awt package.


Question 15 :

What is the immediate super class of Menu?

Answer :

MenuItem