310-019 Sun Certified Associate.Java Platform Se Exam Set 3

Which two are represented in a UML class diagram? (Choose two.)
A. ways to test an application
B. operations of classes and interfaces
C. relationships between classes and interfaces
D. the interactions between objects in sequential order


Options are :

  • B,A
  • B,C
  • C,D
  • A,E

Answer : B,C

How can the two class paths be set for the javac compiler? (Choose two.)
A. using the BIN environment variable
B. using the PATH environment variable
C. using the -classes option to javac
D. using the -classpath option to java
E. using the -classpath option to javac
F. using the -sourcepath option to javac
G. using the CLASSPATH environment variable


Options are :

  • C,D
  • C,D
  • A,B
  • E,G
  • F,G

Answer : E,G

You have developed a MIDlet that runs on a Java-enabled Personal Digital Assistant (PDA)
device. Now, your employer has asked you to port the MIDlet to run on other Java platforms.
Which is true?


Options are :

  • The MIDlet can run within a standard web browser.
  • The MIDlet is NOT guaranteed to run on a Java technology-enabled phone.
  • The MIDlet is guaranteed to run correctly under J2SE.
  • The MIDlet is 100% portable across all J2ME devices.

Answer : The MIDlet is NOT guaranteed to run on a Java technology-enabled phone.

310-019 Sun Certified Associate.Java Platform Se Exam Set 4

Why should package names in Java be unique?


Options are :

  • to avoid class name conflicts if two development groups use the same package and class names
  • to provide the Internet location from which the package can be downloaded
  • to allow classes in the package to be accessed by classes outside of that package
  • to programatically declare specific ownership of classes in the package

Answer : to avoid class name conflicts if two development groups use the same package and class names

Which is true about MIDlets?


Options are :

  • Devices that run MIDlets must provide software that manages wireless downloading of applications.
  • The only API used to create MIDlets is the MIDP API.
  • Devices that support MIDlets must allow the MIDlets to access the device's low-level functions
  • MIDlet devices are not required to allow applications to be uninstalled.

Answer : Devices that run MIDlets must provide software that manages wireless downloading of applications.

Which two classes make valid use of the ArrayList class in package java.util? (Choose two.)

A. import java.util;
public class Test {
public static void main(String args[]) {
ArrayList list = new ArrayList();
}
B. import java.util.ArrayList;
public class Test {
public static void main(String args[]) {
ArrayList list = new ArrayList();
}
C. package java.util;
public class Test {
public static void main(String args[]) {
ArrayList list = new ArrayList();
}
D. package java.util.ArrayList;
public class Test {
public static void main(String args[]) {
ArrayList list = new ArrayList();
}
E. public class Test import java.util.ArrayList {
public static void main(String args[]) {
ArrayList list = new ArrayList();
}
F. public class Test {
public static void main(String args[]) {
java.util.ArrayList list = new java.util.ArrayList();
}


Options are :

  • A,F
  • B,D
  • C,D
  • B,F

Answer : B,F

310-019 Sun Certified Associate.Java Platform Se Exam Set 5

Which is NOT a characteristic of Swing?


Options are :

  • Swing components can be used to develop J2EE client applications.
  • Swing components can display a platform-independent "look and feel
  • Swing components can display a platform-specific "look and feel."
  • A. Swing components are available in all web browsers.

Answer : A. Swing components are available in all web browsers.

Which two keywords directly support looping? (Choose two.)
A. if
B. for
C. while
D. switch
E. foreach


Options are :

  • B,C
  • D,E
  • B,D
  • A,B

Answer : B,C

Which two are true? (Choose two.)
A. JavaScript is the standard J2SE scripting language.
B. JavaScript includes built-in libraries for invoking methods on Enterprise JavaBeans.
C. JavaScript can be used to create a rollover image effect in a web page.
D. JavaScript can only be used in browsers that have the Java Plug-in installed.
E. JavaScript can be used to validate form input values before they are sent to the server.


Options are :

  • A,B
  • C,D
  • D,E
  • C,E

Answer : C,E

310-019 Sun Certified Associate.Java Platform Se Exam Set 6

You need an algorithm that must:
Print the characters of a String, in index order
Skip all instances of the character 'a' that appear in the String
Given:
2. public void foo (String s) {
3. // insert code here
4. }
Which two, inserted independently at line 3, correctly implement the algorithm? (Choose two.)

A. for(char c:s) {
if (c != 'a') System.out.print(c);
}
B. for (int i = 0; i < s.length(); i++) {
if (s.charAt(i) != 'a') System.out.print(i);
}
C. int i = 0;
while (i < s.length()) {
if (s.charAt(i) != 'a') {
System.out.print(i);
}
i++;
}
D. for(int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if (c != 'a') System.out.print(c);
}

E. int i = 0;

while (i < s.length()) {
if (s.charAt(i) != 'a') {
System.out.print(s.charAt(i));
}
i++;
}




Options are :

  • D,E
  • B,C
  • C,D
  • A,B

Answer : D,E

Given:
1. class Test2 {
2. static String setMessage(String str) {
3. return str + "How are you doing?";
4. }
5.
6. public static void main(String[] args) {
7. String str = "Hello! ";
8. str = setMessage(str);
9. System.out.println("str : " + str);
10. }
11. }
What is the result?




Options are :

  • str : Hello! How are you doing?
  • str : Hello!
  • Compilation fails because of an error at line 8.
  • str : How are you doing?
  • Compilation fails because of an error at line 7.
  • Compilation fails because of an error at line 2.
  • Compilation fails because of an error at line 3.

Answer : str : Hello! How are you doing?

Which two, about a client's environment, can be determined by an applet? (Choose two.)
A. type of web server
B. type of web browser
C. version of Java Plug-in
D. type of web container


Options are :

  • A,B
  • B,C
  • C,D
  • A,D

Answer : B,C

310-083 Sun Certified Web Component Developer for J2EE 5 Set 1

  • J2SE and J2ME
  • J2SE and J2EE
  • only J2ME
  • only J2SE
  • J2EE and J2ME
  • Answer : J2SE and J2ME

    310-083 Sun Certified Web Component Developer for J2EE 5 Set 2

    Comment / Suggestion Section
    Point our Mistakes and Post Your Suggestions