Java
answering the questions need basic knowledge of methods in java
Questions
Which of the following methods is/are used by web browser to control the applet?
- Wait()
- Destroy()
- Dead()
- Both 1 and 3
- Both 1 and 2
Which of the following methods is/are not necessary to define a class, if it implements the Window Listener Interface?
- windowMoved()
- windowClosing()
- windowIconified()
- windowActivated()
- windowDeiconified()
Which of the following event types is/are invalid in Java?
- FocusEvent
- ComponentEvent
- AdjustmentEvent
- Both 2 and 3
- None of these
Which of the following methods cannot be invoked from the instance of Frame class in AWT?
- setLocation(int, int)
- setVisible(Boolean)
- setSize(int, int)
- setDefaultCloseOperation(int)
- pack()
Which of the following is the subclass of RuntimeException?
- IllegalArgumentException
- NullPointerException
- IOException
- IndexOutOfBoundException
- ArithmeticException
Which of the following is not a method of the scanner class object in Java?
- next()
- nextLine()
- nextInt()
- nextChar()
- nextLong()
How many constructors is/are present in BorderLayout in java?
- 5
- 4
- 3
- 2
- 1
Which of following layout managers is/are present in Java awt?
- Gridlayout
- Flowlayout
- Cardlayout
- Both 1 and 2
- All of these
Which of the following statements is/are correct?
Color c1 = new Color(284,60,189);
- A new color will be created.
- There will be a runtime exception.
- Parameters are not enough.
- There will be an error
Compile time error : cannot find method color. - Compile time error : Color is abstract, cannot create an object.
Which of the following methods is not defined in the Graphics class in Java?
- fillRect()
- fillCircle()
- fillOval()
- fillArc()
- none of these
The number of parameters passed to the constructor of the Font class in Java is
- 4
- 3
- 2
- 1
- None of these
Which of the following source objects does not generate the ActionEvent?
- JRadioButton
- JCheckBox
- JComboBox
- JList
- JTextField
How many primitive data types are available in Java?
- 9
- 6
- 8
- 7
- 5
How many constructors are there for FlowLayout?
- 5
- 4
- 3
- 2
- 1
Which of the following methods is/are valid in Java for handling events?
- mouseEnetered()
- keyReleased()
- mouseDragged()
- both 1 and 2
- all of these