Practicetest 1Z0-851 Oracle it-exams
Practicetest 1Z0-851 Oracle it-exams
1Z0-851 Java Standard Edition 6 Programmer Certified Professional Exam our products come with a 100% guarantee of success. We hold this claim because of the highly dedicated and expert team that we have and because of our past performance.
IT Exam,IT Certification,braindump,original questions, question pool,document, braindump, test questions, test question, dumps, test answers, it-exams.com, preparation, pdf, certification questions, answers Certification, certification test, practice test, exam dumps, certification training, answers real questions
Practicetest 1Z0-851 Oracle it-exams
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
Practicetest 1Z0-851 Oracle it-exams
1Z0-851 Java Standard Edition 6 Programmer Certified Professional Exam our products come with a 100% guarantee of success. We hold this claim because of the highly dedicated and expert team that we have and because of our past performance.
IT Exam,IT Certification,braindump,original questions, question pool,document, braindump, test questions, test question, dumps, test answers, it-exams.com, preparation, pdf, certification questions, answers Certification, certification test, practice test, exam dumps, certification training, answers real questions
Practicetest 1Z0-851 Oracle it-exams
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
Practicetest 1Z0-851 Oracle it-exams
nina008 - 23. Dez, 05:18