Question 91:  

From: Thomas Bengtsson (12 Feb 2000) / 1.0.2
Given this class ?
class Loop { 
public static void main (String [] args){
        int x=0;
         int y=0;
  outer: for (x=0; x<100;x++) { 
  middle: for (y=0;y<100y++) { 

System.out.printl("x=" + x + "; y=" + y);

if (y==10){

<<<>>>}
}
}
}//main
}//class
                     
The question is which code must replace the <<<>>> to finish the outer loop?

A.
  continue middle;
B.
  break outer;
C.
  break middle;
D.
  continue outer;
E.
  none of these?

Question 92:  

From: Thomas Bengtsson (12 Feb 2000) / 1.0.2
What does it mean when the handleEvent() returns the true boolean?

A.
  The event will be handled by the component.
B.
  The action() method will handle the event.
C.
  The event will be handled by the super.handleEvent().
D.
  Do nothing.

Question 93:  

From: Thomas Bengtsson (12 Feb 2000) / 1.0.2
What is the target in an Event?

A.
  The Object() where the event came from.
B.
  The Object() where the event is destined for.
C.
  What the Object() that generated the event was doing.

Question 94:  

From: Thomas Bengtsson (12 Feb 2000) / 1.0.2
What is the statement to assign a unicode constant CODE with <code>0x30a0</code>?

   

Question 95:  

From: Thomas Bengtsson (12 Feb 2000) / 1.0.2
The following code resides in the source?
class StringTest {

  public static void main (String [] args){
//
// String comparing
//
      String a,b;
      StringBuffer c,d;
      c = new StringBuffer ("Hello");
      a = new String("Hello");
      b = a;
      d = c;

if (<<<operator>>>) {}
}
}//class
                     
Which of the following statement return true for the <<>> line in StringTest.class?

A.
  b.equals(a)
B.
  b==a
C.
  d==c
D.
  d.equals( c)

Question 96:  

From: Thomas Bengtsson (12 Feb 2000) / 1.0.2
Which are valid identifiers?

A.
  %fred
B.
  *fred
C.
  thisfred
D.
  2fred
E.
  fred

Question 97:  

From: Thomas Bengtsson (12 Feb 2000) / 1.0.2
We have the following class X.
public class X {

    public void method();

}
<<<STATEMENTS>>>
                     
Which of the following statement return true for the <<>> line in StringTest.class?

A.
  abstract void method() ;
B.
  class Y extends X {}
C.
  package java.util;
D.
  abstract class z { }

Question 98:  

From: Thomas Bengtsson (12 Feb 2000) / 1.0.2
Which code fragments would correctly identify the number of arguments passed via the command line to a Java Application?

A.
  int count = args.length;
B.
  int count = 0; while args[count] !=null) count++;
C.
  int count = 0; while (!(args[count].equals(""))) count++;
D.
  int count = args.length - 1;

Question 99:  

From: Thomas Bengtsson (12 Feb 2000) / 1.0.2
Given a TextField that is constructed like this:
TextField t = new TextField(30);
                     
Which statement is true?

A.
  The displayed width is 30 columns.
B.
  The displayed string can use multiple fonts.
C.
  The user will be able to edit the character string.
D.
  The displayed line will show exactly thirty characters.
E.
  The maximum number of characters in a line will be thirty.

Question 100:  

From: Thomas Bengtsson (12 Feb 2000) / 1.0.2
What does the java runtime option -cs do? (61)

A.
  check source with debug report
B.
  clear classes that are existing when starting compilation.
C.
  check if the source is newer when loading classes.

{loading}{scripting-1}{scripting}

The Notes
Part I
Part II
Part III
Part IV
Answers{submenus}
DISCLAIMER