Vous êtes sur la page 1sur 2

Q. 1 Which of the following is not a legal Java identifier? A) Num 123 B) %/rate C) $amount D) _a_long_variable Q.

2 Adapter class gives null definition to methods in respective A) interface B) class C) Both A) and B) D) Neither A) nor B) Q. 3 Which of the following statements about ActionEvent events is wrong? A) There is only one method in ActionListener that takes an actionE vent B) When you are entering text into a TextField, typing the Enter ke y causes an ActionEvent C) ScrollBar objects do not generate ActionEvent D) When you are in application, clicking the window close button ca uses an ActionEvent Q. 4 What kind of stream is the System.out object? A) java.io.Buffered Writer B) java.io.PrintStream C) java.io.FileWriter D) java.io.OutputStream Writer Q. 5 How many constructors can be placed in a class? A) Any number of B) One C) Two D) None of these Q. 6 Exception thrown when a number is divided by zero is A) DivisionByZcroExccption B) ArithmeticException C) Infinity Exception D) NumberFormatException Q. 7 The first method to be called when an applet begins execution is A) start() B) init() C) paint() D) run() Q. 8 The concept of multiple inheritances is implemented in Java by A) Extending two or more classes B) Extending one class and implementing one or more interfaces C) Implementing one interface and extending one or more classes D) All the above Q. 9 The default layout manager for an applet is

A) B) C) D)

GridLayout BorderLayout FlowLayout CardLayout

Q. 10 Which of the following cannot be used to draw the Outline Of a square? A) drawLine() B) drawRect() C) drawPolygon() D) fillRect()

Vous aimerez peut-être aussi