SCJA Free Mock Exam

Question 1 of 17 [Algorithm Design and Implementation]
Which of the following are valid String declarations?
Choice 1String name=null;
Choice 2String name="Brian";
Choice 3String name=new String("Brian");
Choice 4String name='Brian';
Choice 5String name=Brian;
Question 2 of 17 [Client Technologies]
Which Java API can provide richer graphical user interface experience than thin clients?
Choice 1AWT
Choice 2SWING
Choice 3MIDlet
Choice 4SWT
Choice 5AJAX
Question 3 of 17 [Client Technologies]
Which Java technology can extend the capabilities of servers that host applications accessed via a request-response programming?
Choice 1EJB
Choice 2MIDlet
Choice 3Servlet
Choice 4Swing
Question 4 of 17 [Client Technologies]
You are assigned to develop desktop training applications for EPractize Labs Software.
Which of the following Java packages can be used to develop GUI programs for the above requirement?
Choice 1javax.awt
Choice 2javax.swing
Choice 3java.awt
Choice 4java.util
Choice 5java.rmi
Question 5 of 17 [Client Technologies]
The product must have the same user interface on both windows and linux.
Which Java API can achieve this goal?
Choice 1javax.swing
Choice 2java.awt
Choice 3java.io
Choice 4java.util
Question 6 of 17 [Fundamental Object-Oriented Concepts]
Which of the following statements are about an abstract class?
Choice 1An abstract class is not required to have an abstract method in it.
Choice 2An abstract class may extend a concrete class.
Choice 3An abstract class can only be subclassed.
Choice 4An abstract class may define concrete methods.
Choice 5All of the Above
Question 7 of 17 [Fundamental Object-Oriented Concepts]
Which of the following packages provide JDBC API?
Choice 1java.jdbc
Choice 2java.sql
Choice 3javax.sql
Choice 4javax.jdbc
Question 8 of 17 [Java Development Fundamentals]
Exclusively developed for individuals preparing for Java Enterprise Edition 5 Enterprise Architect Certified Master Exam (Step 1 of 3) (1Z0-864) and Java Enterprise Edition 5 Enterprise Architect Certified Master Upgrade Exam (1Z0-868).
Which String method can change Exam to Certification in all places?
Choice 1replace("Exam","Certification");
Choice 2replaceAll("Exam","Certification");
Choice 3replaceFull("Exam","Certification");
Choice 4changeAll("Exam","Certification");
Question 9 of 17 [Java Implementation of Object-Oriented Concepts]
Code : MySuperClass.java

abstract class MySubClass{
MySubclass(){
System.out.println("MySubClass ");
}
}

public class MySuperClass extends MySubClass {
MySuperClass(){
System.out.println("MySuperClass ");
}
public static void main(String[] args) {
MySubClass obj = new MySuperClass();
}
}
What will be the result of compiling and running the given code?
Choice 1The code compiles without any error when we change MySubClass to MySuperClass and MySuperClass to MySubClass.
Choice 2Does not compile since obj is of type MySubClass which is abstract
Choice 3Does not compile since MySuperClass extends MySubClass which is abstract
Choice 4Prints "MySubClass"
Choice 5Prints "MySuperClass MySubClass"
Choice 6Prints "MySubClass MySuperClass "
Question 10 of 17 [Java Implementation of Object-Oriented Concepts]
Code : Test.java

class Test{
enum RunMode{CLIENT, SERVER, STAND_ALONE}
public static void main(String args[]){
System.out.println(RunMode.CLIENT);
}
}
What will be the result of compiling and running the given code?
Choice 10
Choice 2CLIENT
Choice 31
Choice 4Do not compile
Question 11 of 17 [Java Platforms and Integration Technologies]
Java SE provides two kinds of network implementation 1. Socket based and 2. RMI based
Which of the following statements are true?
Choice 1RMI uses sockets
Choice 2Socket uses RMI
Choice 3RMI is not included in Java SE
Choice 4RMI is included in Java EE
Question 12 of 17 [Java Platforms and Integration Technologies]
Which Java technology can be used to implement publish-subscribe messaging model?
Choice 1JMS
Choice 2EJB
Choice 3JAX-RPC
Choice 4JAXB
Question 13 of 17 [Server Technologies]
Which Java EE 6 API can be used for implementing RESTful Web services?
Choice 1JAX-RS
Choice 2JAXB
Choice 3SOAP
Choice 4JAX-RPC
Choice 5JAX-WS
Question 14 of 17 [Server Technologies]
Which of the following are valid EJB types of Java EE 5?
Choice 1Stateless session bean
Choice 2Stateful session bean
Choice 3Message driven bean
Choice 4Singleton Session Bean
Choice 5Bean Managed Session Bean
Choice 6Container Managed Session Bean
Question 15 of 17 [Server Technologies]
Which component can act as a controller for a web application to interact with EJB components?
Choice 1HTML
Choice 2Java Script
Choice 3Java Servlet
Choice 4Swing
Question 16 of 17 [UML Representation of Object-Oriented Concepts]
A multiplicity value between 2 and 6 is shown as
Choice 12->6
Choice 22 to 6
Choice 32..6
Question 17 of 17 [UML Representation of Object-Oriented Concepts]
Which of the following symbols can be used to indicate the visibility of an attribute in UML?
Choice 1+
Choice 2-
Choice 3&
Choice 4*