2.public
class Test3{
Q12)What is need of wrapper class? 1) class Top {
static void myTop() {
void myTop() { A)
Compile Time error 2) public class MyTest {
final int x; A)
Compile time error 3) class MyTest {
public void myTest() {
public static void myStat() { public class Test extends MyTest {
public void myTest() {
public static void myStat() { public static void main ( String args[] ) {
MyTest mt = new Test(); A)
Printing myTest in MyTest class followed by Printing myStat in
MyTest class 4) Which of the following are examples of immutable classes , select all correct answer(s)? A)
String 5) Select the correct answer for the code fragment given below? public class TestBuffer {
public void myBuf( StringBuffer s, StringBuffer s1) {
public static void main ( String args[] ) { A)
Prints Hello how are you 6) What is the result when you compile and run the following code? public class MyTest {
public void myTest( int[] increment ) {
public static void main ( String args[] ) { A)
Compile time error 7) The following code has some errors, select all the correct answers from the following? public class MyTest {
public void myTest( int i ) { A) At
class declaration 8) At what point the following code shows compile time error? class A
{ class B
extends A { public
class C extends A {
public static void main ( String args[] ) { A) A a
= new A(); // Line 1 9. This piece of code:
Produces (select all correct statements):
10. Of the five Component methods listed below, only one is also a method of the class MenuItem. Which one?
11 The layout of a container can be altered using which of the following methods:
12. Given that a Button can generate an ActionEvent which listener would you expect to have to implement, in a class which would handle this event?
13. Assuming we have a class which implements the ActionListener interface, which method should be used to register this with a Button?
14. What are Wrapper Classes? 15. Which containers use a FlowLayout as their default layout? 16. Which is the super class of all event classes?
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||