JFC Overview Self
Test With Answers
1) The x in javax.*
stands for
a) export
b)
extension
c) access
d)
extra
( b )
2)
Which of the following imports is responsible for bringing in
the
common layout managers like GridLayout?
a)
import.java.layouts.*;
b)
import javax. swing.*;
c)
import java.awt.event.*;
d)
import java.awt.*;
( d )
3) Given the
following class declaration which of the following is
not correct.
class X implements Y, Z{ }
a)
X x = new X( );
b) Y
y = new Y( );
( b )
c) Z
z = new X( );
4) Which of the following statements is not correct regarding interfaces.
a) A class can implement
several interfaces
b) A class can be declared to be the type of
an interface it implements
c) A class that implements an
interface must provide implementations
for the
methods of the interface.
d) A method can be defined in an
interface with a method body
( d )
5) Which of the
following statements is not correct?
a) Interfaces can be defined
that contain no methods.
b) Interfaces can multiply inherit
c)
Methods in interfaces are by default abstract and public
d)
Interface constants are static and may have public or private
access.
( d )
6) Which of the following statements are not correct?
a ) Inner classes defined inside methods can only access