Certification Practice Test | PDF Questions | Actual Questions | Test Engine | Pass4Sure
212-055 : Sun Certified Programmer for the Java 2 Platform.SE 5.0 Exam

SUN 212-055 Questions & Answers
Full Version: 581 Q&A
212-055 Dumps
212-055 Braindumps
212-055 Real Questions
212-055 Practice Test
212-055 Actual Questions
killexams.com
SUN
212-055
Sun Certified Programmer for the Java 2 Platform.SE 5.0
https://killexams.com/pass4sure/exam-detail/212-055
}
}
And the invocation:
31. test(null); What is the result?
An exception is thrown at runtime.
"String is empty" is printed to output.
Compilation fails because of au error in line 12.
"String is not empty" is printed to output.
Answer: A
QUESTION: 214
Given:
public static void test(String str) {
int check = 4;
if (check = str.length()) {
System.out.print(str.charAt(check -= 1) +", ");
} else {
System.out.print(str.charAt(0) + ", ");
}
}
And the invocation:
test("four");
test("tee");
test("to"); What is the result?
r, t, t,
r, e, o,
Compilation fails.
An exception is thrown at runtime.
Answer: C
QUESTION: 215
Given:
10. public class MyClass { 11.
public Integer startingI;
public void methodA() {
Integer i = new Integer(25);
startingI = i;
methodB(i);
}
private void methodB(Integer i2) {
i2 = i2.intValue(); 20.
}
}
If methodA is invoked, which two are true at line 20? (Choose two.)
i2 == startingI returns true.
i2 == startingI returns false.
i2.equals(startingI) returns true.
i2.equals(startingI) returns false.
Answer: B, C
QUESTION: 216
Given:
class Cup { }
class PoisonCup extends Cup { }
....
public void takeCup(Cup c) {
if(c instanceof PoisonCup) {
System.out.println("Inconceivable!");
} else if(c instanceof Cup) {
System.out.println("Dizzying intellect! ");
} else {
System.exit(0);
}
}
And the execution of the statements: Cup cup = new PoisonCup(); takeCup(cup); What is the output?
Inconceivable!
Dizzying intellect!
The code runs with no output.
An exception is thrown at runtime.
Compilation fails because of an error in line 22.
Answer: A
QUESTION: 217
Given:
String[] elements = { "for", "tea", "too" };
String first = (elements.length > 0) ? elements[0] : null; What is the result?
Compilation fails.
An exception is thrown at runtime.
The variable first is set to null.
The variable first is set to elements[0].
Answer: D
QUESTION: 218
Given:
public class ClassA {
public int getValue() {
int value=0;
boolean setting = true;
String title="Hello";
if (value || (setting && title == "Hello")) { return 1; }
if (value == 1 & title.equals("Hello")) { return 2; }
}
}
And:
ClassA a = new ClassA();
a.getValue(); What is the result?
1
2
Compilation fails.
The code runs with no output.
An exception is thrown at runtime.
Answer: C
QUESTION: 219
Click the Exhibit button. What is the result? Exhibit:
go in Goban go in Sente go in Sente
go in Sente go in Sente go in Goban
go in Sente go in Goban go in Goban
go in Goban go in Goban go in Sente
Compilation fails because of an error in line 17.
Answer: C
QUESTION: 220
Given:
public class Foo {
public int a;
public Foo() { a = 3; }
public void addFive() { a += 5; }
}
and:
public class Bar extends Foo {
public int a;
public Bar() { a = 8; }
public void addFive() { this.a +=5; }
}
invoked with:
Foo foo = new Bar();
foo.addFive();
System.out.println("Value: "+ foo.a); What is the result?
Value: 3
Value: 8
Value: 13
Compilation fails.
The code runs with no output.
An exception is thrown at runtime.
Answer: A
QUESTION: 221
Which of the following follows Correct Java Bean Listner rules:
Listener()
addMouseListener()
removeMyListener()
Answer: A, B, D
User: Natalia*****![]() ![]() ![]() ![]() ![]() I am grateful to Killexams.com for helping me pass my 212-055 exam, saving both time and effort. While I faced some confusion with certain questions and had to make educated guesses, their Questions and Answers provided a solid foundation. In hindsight, I wish I had focused more on the material, but I am thrilled to have passed and appreciate Killexams.com’s support. |
User: Rayia*****![]() ![]() ![]() ![]() ![]() When I realized that I needed to pass my 212-055 exam, I knew that I needed help to achieve my goal. Fortunately, a friend recommended Killexams.com to me, and it turned out to be a real boon. The study material provided by Killexams.com helped me regain the intelligence that I had lost for a while, and I was able to pass my 212-055 exam with an amazing 88%. |
User: Ruzha*****![]() ![]() ![]() ![]() ![]() Reliable testprep Questions and Answers fulfilled my dream of 212-055 certification, with an 89% score achieved in just three weeks. Their guide mastered my time management, ensuring exam success, and I am deeply thankful for their support. |
User: Leika*****![]() ![]() ![]() ![]() ![]() I frequently recommend Killexams.com to colleagues preparing for the 212-055 exam. Their practice tests and exam simulator are reliable and top-notch, providing the most comprehensive study materials available. The platform’s user-friendly design and accurate content made my preparation seamless, and I’m grateful for their exceptional resources. |
User: Hugo*****![]() ![]() ![]() ![]() ![]() The Killexams.com 212-055 exam simulator helped me gain confidence before the exam. The simulator included the real exam questions and the latest updates, which helped me feel more prepared and secure on the day of the exam. |
Features of iPass4sure 212-055 Exam
- Files: PDF / Test Engine
- Premium Access
- Online Test Engine
- Instant download Access
- Comprehensive Q&A
- Success Rate
- Real Questions
- Updated Regularly
- Portable Files
- Unlimited Download
- 100% Secured
- Confidentiality: 100%
- Success Guarantee: 100%
- Any Hidden Cost: $0.00
- Auto Recharge: No
- Updates Intimation: by Email
- Technical Support: Free
- PDF Compatibility: Windows, Android, iOS, Linux
- Test Engine Compatibility: Mac / Windows / Android / iOS / Linux
Premium PDF with 581 Q&A
Get Full VersionAll SUN Exams
SUN ExamsCertification and Entry Test Exams
Complete exam list