1Z0-850 | The Abreast of the times Guide To 1Z0-850 vce


Q21. - (Topic 2) 

Click the Exhibit button. Which two are true? (Choose two.) 

A. Every Dippy must be associated with at least one Zippy. 

B. Every Dippy must be associated with exactly one Zippy. 

C. It is valid for a Zippy to be associated with more than one Dippy. 

D. It is valid for a Zippy to have no associated Dippy. 

E. Every Zippy must be associated with exactly one Dippy. 

F. It is valid for a Dippy to have no associated Zippy. 

Answer: A,D 

Q22. - (Topic 2) 

Which is true about RMI? 

A. RMI is used to create thin web clients. 

B. RMI is used to develop applications for wireless mobile devices. 

C. RMI is the Java API used for executing queries on a database. 

D. RMI allows objects to be sent from one computer to another. 

E. RMI is the transport protocol used by web servers and browsers. 

Answer:

Q23. - (Topic 2) 

Which three are true? (Choose three.) 

A. If abstract class B directly extends abstract class A, class B must implement all abstract methods declared in A. 

B. An abstract class CANNOT be instantiated. 

C. An interface can extend multiple interfaces. 

D. All methods in an abstract class must be abstract. 

E. If concrete class C extends concrete class B, and B implements interface A, then all methods from interface A can be invoked on an instance of C. 

Answer: B,C,E 

Q24. - (Topic 1) 

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? 

A. x = 5 

B. x = 3 

C. x = 6 

D. x = 4 

E. x = 2 

Answer:

Q25. - (Topic 2) 

Given: 

3.

 interface Pet { 

4.

 void eat(); 

5.

 } 

6.

 class Dog implements Pet { public void eat() { } } 

7.

 class Beagle extends Dog { public void eat() { } } 

Which demonstrates the "program to an interface" principle? 

A. class PetFood extends Pet { public void go(PetFood d) { 

B. eat(); } 

C. class PetFood { public void go(Dog d) { D. eat(); } 

E. class PetFood { public void go(Beagle b) { 

F. eat(); } 

G. interface PetFood implements Pet { public void go(Pet d) { 

H. eat(); } 

I. class PetFood { public void go(Pet p) { 

J. eat(); } 

Answer:

Q26. - (Topic 2) 

Click the Exhibit button. 

Which diagram best represents the relationship "A Dog has four Legs" based on the 

definitions of association and composition? 

A. A 

B. C 

C. D 

D. B 

Answer:

Q27. - (Topic 1) 

Click the Exhibit button. Which, inserted at line 3 of the TestDrink class, demonstrates the "program to an interface" principle? 

A. Drinkable aDrink = DrinkableFactory.getDrinkable(); 

B. Drinkable aDrink = new Drinkable(); 

C. Tea aDrink = new Drinkable(); 

D. Tea aDrink = new Tea(); 

Answer:

Q28. - (Topic 1) 

Given: 

17. class B { } Which demonstrates inheritance? 

A. class A this B { } 

B. class A extends B { } 

C. class A super B { } 

D. class A implements B { } 

Answer:

Q29. - (Topic 1) 

Given: 

Directory structure: projects |__src | |__foo | |__classes 

A file Clock.java in the /projects/src/foo directory The working directory /projects/src 

The class Clock in package foo 

Which command-line compiler invocation will create a foo directory within the classes directory, and then place the compiled Clock.class within that directory? 

A. javac -directory ../classes/foo foo/Clock.java 

B. javac -d ../classes/foo/Clock.java 

C. javac -d ../classes/foo foo.Clock.java 

D. javac -D foo/Clock.java 

E. javac -d ../classes foo/Clock.java 

Answer:

Q30. - (Topic 1) 

Which two are true about stateless session beans? (Choose two.) 

A. They are used to represent data stored in an RDBMS. 

B. They implement the JMS API. 

C. They are used to implement business logic. 

D. They CANNOT hold client state. 

Answer: C,D