1Z0-850 - Java Standard Edition 5 and 6, Certified Associate Exam

Go back to Oracle

Exam FAQ

How many questions are there on the 1Z0-850 exam? How long is the 1Z0-850 exam? How much does the 1Z0-850 exam cost? What is the best way to study for the 1Z0-850 exam?

Example Questions

Which two are true? (Choose two.) Given: .1. class Test { .2. public static void main(String[] args) { .3. int num = 1; .4. for (num = 0; num < 3; ++num ) { .5. num *= 2; .6. } .7. System.out.println("num = " + (num++)); .8. } .9. } What is the result? You are asked to create code that defines a Beverage, and includes method implementation code for some beverage behaviors. Beverage subtypes will be required to provide implementations of some, but not all, of the methods defined in Beverage. Which approach correctly implements these goals? Which is true about RMI? What is the purpose of JNDI? Which two are true about HTML? (Choose two.) Which two are benefits of servlets? (Choose two.) Given two complete source files: 1. /* Example.java */ 2. package pack; 3. public class Example { } 1. /* Test.java */ 2. // insert code here 3. public class Test { 4. public static void main(String args[]) { 5. Example obj = new Example(); 6. } 7. } Which, inserted at line 2 in Test.java, allows the code to compile? Which two are true about the Swing API? (Choose two.) Given: .1. public class Foo { .2. public static void main() { .3. System.out.println("Hello."); .4. } .5. } Which is true? Which three are true? (Choose three.) Which is an appropriate description of session beans? Which two technologies are used for processing HTTP requests and mapping those requests to business objects? (Choose two.) Given: - 1. class Exam { - 2. private int num = 0; - 3. public int getNum() { - 4. return num; - 5. } - 6. } - 7. public class Sample { - 8. public static void main(String[] args) { - 9. Exam e = new Exam(); - 10. e.num = 100; - 11. int num = e.getNum(); - 12. System.out.println("The number is: " + num); - 13. } - 14. } What is the result? Which is NOT a correct statement about entity beans? Given: 18. String s = " abcdcba "; 19. int x = 2; 20. s = s.trim(); 21. if (s.length() < 8) { 22. x = s.indexOf('c', 3); 23. } 24. System.out.println("x = " + x); What is the result? Given that TestClass relies on classes in the someJar.jar file in /some/dir, which javac invocation will correctly compile TestClass in the current directory? Which two are valid? (Choose two.) Which two are features of JNDI? (Choose two.) Which Java technology provides a standard API for relational database access? Given: - 1. class Test { - 2. public static void main(String args[]) { - 3. String str = new String("Welcome"); - 4. // insert code here - 5. } - 6. } Which, inserted at line 4, produces the output true? Which two symbols are used to indicate the visibility of an attribute in UML? (Choose two.) Given: - 1. class Test { - 2. public static void main(String args[]) { - 3. int i = 1; - 4. while (i-- > 1) { - 5. System.out.println("i : " + i); - 6. } - 7. } - 8. } What is the result? Which is a requirement to use applets in a web browser? Which two are associated with the web tier in a multitier web-based application? (Choose two.) Which is true? Which is true regarding multiplicity? A Java developer needs to be able to send email, containing XML attachments, using SMTP. Which J2EE technology provides this capability? Given: .1. class Test { .2. public static void main(String args[]) { .3. int i = 1; .4. while (i-- > 1) { .5. System.out.println("i : " + i); .6. } .7. } .8. } What is the result? Which statement about threading in Java is false? Given two complete source files: .1. /* Example.java */ .2. package pack; .3. public class Example { } .1. /* Test.java */ .2. // insert code here .3. public class Test { .4. public static void main(String args[]) { .5. Example obj = new Example(); .6. } .7. } Which, inserted at line 2 in Test.java, allows the code to compile? You need an algorithm that must: - Iterate through an array of primitive integers - Print the value of each array element in index order If the value of the element is equal to 10, print the value of the element, and then terminate the iteration Which method correctly implements the algorithm? Which two are true about the composition relationship "A Blip consists of many Blipverts."? (Choose two.) Which two are valid representations of operations in UML? (Choose two.) Which two are benefits of JSP technology? (Choose two.) Given: 1. public enum Color { RED, YELLOW, GREEN } 2. enum Fruit { 3. Banana(Color.RED), 4. Apple(Color.YELLOW), 5. Kiwi(Color.GREEN); 6. private Color color; 7. Fruit(Color color) { 8. this.color = color; 9. } 10. } 11. class Test { 12. public void method() { 13. // insert code here 14. } 15. } Which two, inserted independently at line 13, allow the code to compile? (Choose two.) Which option will correctly initialize the property com.example.property to someValue when invoking java? Which technology is used to develop components that interact with server-side objects in a web-based application? You need to create a class Foo that will record the number of times the go ( ) method is invoked on a particular instance of the class. Which solution correctly implements this goal? Which is NOT associated with the web tier in a J2EE web-based application? Which two are associated with the web tier in a J2EE web-based application.? (Choose two.) Which two are characteristics of an RDBMS? (Choose two.) Which type of primitive can be assigned a new value within a conditional expression? Which two keywords directly support looping? (Choose two.) Given: 1. class Book { 2. public String title; 3. 4. public void setTitle(String title) { 5. if (checkTitle(title)) this.title = title; 6. } 7. public String getTitle() { 8. return title; 9. } 10. private boolean checkTitle(String newTitle) { 11. // code that verifies proposed title change 12. } 13. } Which two are true? (Choose two.) A developer must implement a "shopping cart" object for a web-based application. The shopping cart must be able to maintain the state of the cart, but the state is not stored persistently. Which J2EE technology is suited to this goal? Given: .1. public class Boat{ .2. // insert code here .3. public void setGas(int v){ .4. gas = v; .5. } .6. } Which, inserted at line 2, is valid and demonstrates encapsulation? You need to create a class that maintains a customer's account balance. The class must allow both credits (deposits) and debits (withdrawals) to the account. Which class correctly implements this functionality? Given two complete source files: - 1. /* Example.java */ - 2. package pack; - 3. public class Example { } - 1. /* Test.java */ - 2. // insert code here - 3. public class Test { - 4. public static void main(String args[]) { - 5. Example obj = new Example(); - 6. } - 7. } Which, inserted at line 2 in Test.java, allows the code to compile? Which type of GUI component is NOT included in Swing?

Study Guides