www.cert24.com,test dumps, practice test, pdf 1Z0-851 Oracle cert24

www.cert24.com,test dumps, practice test, pdf 1Z0-851 Oracle cert24

www.cert24.com,test dumps, practice test, pdf 1Z0-851 Oracle cert24

IT Exam,IT Certification,braindump,original questions, question pool,document, braindump, test questions, test question, dumps, test answers, cert24.com, preparation, pdf, certification questions, answers Certification, certification test, practice test, exam dumps, certification training, answers real questions

1Z0-851 Java Standard Edition 6 Programmer Certified Professional Exam We believe in helping our customers achieve their goals. For this reason, we take great care while preparing our Questions and Answers , Core Administration. Our practice tests Administration are prepared with the help of highly professional people from the industry, so we benefit from their vast experience and knowledge.

www.cert24.com,test dumps, practice test, pdf 1Z0-851 Oracle cert24

QUESTION 1
A team of programmers is involved in reviewing a proposed design for a new utility class. After some discussion, they realize that the current design allows other classes to access methods in the utility class that should be accessible only to methods within the utility class itself. What design issue has the team discovered?

A. Tight coupling
B. Low cohesion
C. High cohesion
D. Loose coupling
E. Weak encapsulation
F. Strong encapsulation

Answer: E

QUESTION 2
Given a method that must ensure that its parameter is not null:

11. public void someMethod(Object value) {
12. // check for null value

20. System.out.println(value.getClass());
21. }

What, inserted at line 12, is the appropriate way to handle a null value?

A. assert value == null;
B. assert value != null, “value is null”;
C. if (value == null) { throw new AssertionException(“value is null”); }
D. if (value == null) { throw new IllegalArgumentException(“value is null”); }

Answer: D

QUESTION 3
Given:

public class Target {
private int i = 0;
public int addOne() {
return ++i;
}
}

And:

public class Client {
public static void main(String[] args){
System.out.println(new Target().addOne());
}
}

Which change can you make to Target without affecting Client?

A. Line 4 of class Target can be changed to return i++;
B. Line 2 of class Target can be changed to private int i = 1;
C. Line 3 of class Target can be changed to private int addOne(){
D. Line 2 of class Target can be changed to private Integer i = 0;

Answer: D

www.cert24.com,test dumps, practice test, pdf 1Z0-851 Oracle cert24

Comments are closed.