SUN 212-055 Questions & Answers

Full Version: 581 Q&A


Latest 212-055 Exam Questions and Practice Tests 2025 - Killexams.com


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


  1. }

  2. }

And the invocation:

31. test(null); What is the result?


  1. An exception is thrown at runtime.

  2. "String is empty" is printed to output.

  3. Compilation fails because of au error in line 12.

  4. "String is not empty" is printed to output.


Answer: A


QUESTION: 214

Given:

  1. public static void test(String str) {

  2. int check = 4;

  3. if (check = str.length()) {

  4. System.out.print(str.charAt(check -= 1) +", ");

  5. } else {

  6. System.out.print(str.charAt(0) + ", ");

  7. }

  8. }

And the invocation:

  1. test("four");

  2. test("tee");

  3. test("to"); What is the result?


  1. r, t, t,

  2. r, e, o,

  3. Compilation fails.

  4. An exception is thrown at runtime.


Answer: C


QUESTION: 215


Given:

10. public class MyClass { 11.

  1. public Integer startingI;

  2. public void methodA() {

  3. Integer i = new Integer(25);

  4. startingI = i;

  5. methodB(i);

  6. }

  7. private void methodB(Integer i2) {

  8. i2 = i2.intValue(); 20.

  1. }

  2. }

If methodA is invoked, which two are true at line 20? (Choose two.)


  1. i2 == startingI returns true.

  2. i2 == startingI returns false.

  3. i2.equals(startingI) returns true.

  4. i2.equals(startingI) returns false.


Answer: B, C


QUESTION: 216

Given:

  1. class Cup { }

  2. class PoisonCup extends Cup { }

....

  1. public void takeCup(Cup c) {

  2. if(c instanceof PoisonCup) {

  3. System.out.println("Inconceivable!");

  4. } else if(c instanceof Cup) {

  5. System.out.println("Dizzying intellect! ");

  6. } else {

  7. System.exit(0);

  8. }

  9. }

And the execution of the statements: Cup cup = new PoisonCup(); takeCup(cup); What is the output?


  1. Inconceivable!

  2. Dizzying intellect!

  3. The code runs with no output.

  4. An exception is thrown at runtime.

  5. Compilation fails because of an error in line 22.


Answer: A


QUESTION: 217

Given:

  1. String[] elements = { "for", "tea", "too" };

  2. String first = (elements.length > 0) ? elements[0] : null; What is the result?


  1. Compilation fails.

  2. An exception is thrown at runtime.

  3. The variable first is set to null.

  4. The variable first is set to elements[0].


Answer: D


QUESTION: 218

Given:

  1. public class ClassA {

  2. public int getValue() {

  3. int value=0;

  4. boolean setting = true;

  5. String title="Hello";

  6. if (value || (setting && title == "Hello")) { return 1; }

  7. if (value == 1 & title.equals("Hello")) { return 2; }

  8. }

  9. }

And:

  1. ClassA a = new ClassA();

  2. a.getValue(); What is the result?


  1. 1

  2. 2

  3. Compilation fails.

  4. The code runs with no output.

  5. An exception is thrown at runtime.


Answer: C


QUESTION: 219

Click the Exhibit button. What is the result? Exhibit:



  1. go in Goban go in Sente go in Sente

  2. go in Sente go in Sente go in Goban

  3. go in Sente go in Goban go in Goban


  4. go in Goban go in Goban go in Sente

  5. Compilation fails because of an error in line 17.


Answer: C


QUESTION: 220

Given:

  1. public class Foo {

  2. public int a;

  3. public Foo() { a = 3; }

  4. public void addFive() { a += 5; }

  5. }

and:

  1. public class Bar extends Foo {

  2. public int a;

  3. public Bar() { a = 8; }

  4. public void addFive() { this.a +=5; }

  5. }

invoked with:

  1. Foo foo = new Bar();

  2. foo.addFive();

  3. System.out.println("Value: "+ foo.a); What is the result?


  1. Value: 3

  2. Value: 8

  3. Value: 13

  4. Compilation fails.

  5. The code runs with no output.

  6. An exception is thrown at runtime.


Answer: A


QUESTION: 221

Which of the following follows Correct Java Bean Listner rules:


  1. Listener()


  2. addMouseListener()

    updateActionListener()

  3. removeMyListener()


Answer: A, B, D


User: Theodor*****

I found killexams.com to be a nice platform for 212-055 exam preparation. The platform provided me with the best level of preparation and made studying interesting. With the help of killexams.com, I was able to grow and pass the 212-055 exam with excellent scores.
User: Nelya*****

Killexams provided me with valid and reliable 212-055 practice materials, which helped me prepare for the exam with confidence. I could test myself before the actual exam, which made me feel well-prepared. Thanks to Killexams, I could score well in the 212-055 exam.
User: Regina*****

Thanks to killexams.com, I was able to correct my mistakes and earn the trust of my parents. The 212-055 exam was my chance to prove myself, and I successfully passed it because of their guidance and support.
User: Lena*****

I am proud to say that I have passed the 212-055 exam. All the questions on the exam were from Killexams.com. It was a real help for me on the 212-055 exam, and all my achievement goes to this guide. With the help of this test material, I was proficient enough to attempt all the questions in the 212-055 exam. The exam preparation material led me in the right direction and guaranteed 100% success in the exam.
User: Max*****

I never suspected that the topics I had consistently avoided would be such a top-notch amount of fun for the exam. Killexams.com smooth and concise approach to the key points made my planning process much less stressful and helped me get 89% marks. I was going to give up the 212-055 exam, but with only a week left, I decided to update to their practice tests for my exam preparation.

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

All SUN Exams

SUN Exams

Certification and Entry Test Exams

Complete exam list