Awt Questions
Awt Questions
Q1. Which of the following class is derived from the container class?
(a) Component (b) Panel
(c) MenuComponent (d) List
Q2.Name of the class used to represent a GUI application window, which is optionally
resizable and can have a title bar, an icon, and menus.
(a)Window (b) Panel
(c)Dialog (d) Frame
Q3.Which abstract class is the super class of all menu related classes?
(a) MenuComponent (b ) MenuBar
(c ) MenuItem (d) CheckboxMenuItem
Q.5 Which can be used to represent a checkbox with a textual label that can appear
in a menu?
(a)MenuBar (b) Menuitem
(c) CheckboxMenuItem (d) Menu
Q.6 Which of these classes can be added to any Container class, using the add method
defined in Container class?
(a)Button (b) CheckboxMenuItem
(c)Menu (d) MenuBar
Q. 13 JIT meaning______
(a)Java In Time (b)Just In Time
(c)Join In Time (d)None of the Above
Q. 26 Which of the following applet class displays the result of the applet code on the screen?
(a) paintO (b) voidO (c) stringO (d) getkeyO
Q.38 Swing components that don’t rely on Native GUI are reffered to as __________
(a)Ligthweight component (b)heavy weight component
(c) GUI component (d) Non GUI component
Q. 39 What is jdb ?
(a) Java debugger (b) Java interpreter
(c) Java compiler (d) Java disassemble
Q.53.can you use setBackground() method to set the background color for ____?
(a) Component (b) Container
(c ) JComponent (d) All three
Q. 54 In which package, exception class is available?
(a) java.lang (b)java.util (c) java.io (d)java.awt
Q.55 Arguments passed via command line are stored as __ data type.
(a) argument (b) double
(c) string (d) integer
Q. 57 A GUI _
(a) uses buttons, menus, and icons
(b) should be easy for a user to manipulate
(c) stands for Graphic Use Interaction.
(d) Both (a) and (b).
Q. 58 An object is composed of :
(a) Properties (b)Methods (c) Events (d)All of the above
Q.60 The Swing component classes that are used in encapsulate a mutually exclusive set of buttons ?
(a) AbstractButton (b) ButtonGroup
(c) JButton (d) ImegeIcon
Q.61 The Java Foundation Classes (JFC) is a set of GUI components which simplify the
development of desktop applications?
(a) True (b)False
Q62.To specify font to be Bold and Italic use font style value
(a) Font .PLAIN (b) Font. BOLD
(c) Font.ITALIC (d) Font.BOLD +Font.ITALIC
Q.63 In Graphics class, Which method is used to set the graphics current color
To the specified color?
(a) Public abstract void setFont(Font font)
(b) Public abstract void setColor(Color c)
(c) Public abstract void drawString(String str,int x,int y)
(d) None of the above
Q.64 In Graphics class,which methodis used to draws a rectangle with the specified
Width and height?
(a)public void draw Rect(int x, int y, int width, int height)
(b)public abstract void fillRect (int x, int y, int width, int height)
(c)public abstract void drawLine(int x1,int y1, int x2, int y2)
(d)public abstract void drawOval(int x, int y, int width, int height)
Q.67 The relationship between a parent class and a child class is referred to
As a(n)_____relationship.
(a) is-a (b )was-a
(c) has-a (d )instance-of (e) alias
Q.68 Java does not support multipleinheritance, but some of the abilities of multiple
inheritance are available by________
(a) implementing interfaces
(b) creating aliases
(c) importing classes
(d) using public rather than protected or private modifiers