Monday 28 January 2013

SCJP DUMPS 2012 2013 |OCJP DUMPS::Collections And Generics Q.1


OCJP DUMPS | SCJP DUMPS 2012 :
                 COLLECTIONS And GENERICS Dumps :

Question NO..1

Given:

import java.util.*;
public class Group extends HashSet<Person> {
public static void main(String[] args) {
Group g = new Group();
g.add(new Person("Hans"));
g.add(new Person("Lotte"));
g.add(new Person("Jane"));
g.add(new Person("Hans"));
g.add(new Person("Jane"));
System.out.println("Total: " + g.size());
}
public boolean add(Object o) {
System.out.println("Adding: " + o);
return super.add(o);
}}
class Person {
private final String name;
public Person(String name) { this.name = name; }
public String toString() { return name; }
}
Which of the following occur at least once when the code is compiled and run?
(Choose all that apply.)
A. Adding Hans
C. Adding Jane
E. Total: 5
B. Adding Lotte
D. Total: 3
F. The code does not compile.
G. An exception is thrown at runtime.



   Check Answer:              F

F is correct. The problem here is in Group's add() method—it should have been
add(Person), since the class extends HashSet<Person>. So this doesn't compile.
Pop Quiz: What would happen if you fixed this code, changing add(Object) to
add(Person)? Try running the code to see if the results match what you thought.
-> A, B, C, D, E, and G are incorrect based on the above.



Related Questions::

1. Scjp Ocjp dumps 2012: Question no 1.
2. Scjp Ocjp Dumps : Question no. 2
3 .SCJP certification dumps |Ocjp dumps| Ocjp 1.6 dumps.

60 comments:

  1. For Latest OCJP6 Facebook updates see

    https://www.facebook.com/OCJP6

    ReplyDelete
  2. Latest OCJP Vaild Dumps(April 2013):
    http://avstudentz.blogspot.in/2013/04/ocjp-6-latest-dumps.html

    ReplyDelete
    Replies
    1. Hi Anonymous,
      The link you posted says that it dont have that link.

      Delete
    2. This link is to fool . .. . The post says i dont have that link

      Delete
    3. hi

      I'm planning to write OCJP this year...

      could any of you please send the latest valid dumps 2013 to my mail id : nitin.vishwanath21@gmail.com

      Delete
  3. can u please send latest dumps to ramacmfl@gmail.com???....i have the exam the weekk...

    ReplyDelete
  4. Please send me the latest dumps @ r.murarik@gmail.com asap...

    ReplyDelete
  5. pls send me the latest SCJP certification dumps question

    ReplyDelete
  6. Can you plesase send latest dumps to govindsethiya@gmail.com

    ReplyDelete
  7. send me latest dumb at nikhiljain0310@gmail.com

    ReplyDelete
  8. send me latest scjp dumps at vidyaganesh.nagarajan@kgfsl.com

    ReplyDelete
  9. can you please send me latest ocjp dumps at my email id:dhru18shah@gmail.com

    ReplyDelete
  10. Can you plesase send latest dumps to harshgupta69@gmail.com

    ReplyDelete
    Replies
    1. Are you looking for latest ocjp/scjp dumps
      find latest dumps and updates at https://www.facebook.com/OCJP6

      Delete
  11. Plz can you please send latest dumps to anu.kethineni @Gmail.com . Thank you

    ReplyDelete
  12. can you please send me latest ocjp dumps at my email appu.chennai.india@gmail.com

    ReplyDelete
  13. Can you plzzz send me the dumps to sneha20n@gmail.com

    ReplyDelete
  14. plz send me dumps on gaurvi.gadia@gmail.com

    ReplyDelete
  15. can u plz send the scjp latest dumps on santy.aries@gmail.com

    ReplyDelete
  16. could you please send me latest dump on samuel.spielmann@gmail.com

    ReplyDelete
  17. hey guys.. did anybody received the response from here to ur email?

    ReplyDelete
  18. I dont think so they ever send the Dump.
    Lat time I was allowed to download the doc.But it is password Protected

    ReplyDelete
  19. Latest OCJP 6 updates on Facebook page https://www.facebook.com/OCJPFORUM

    ReplyDelete
  20. i want a scjp dumps collections of 2012&2013

    for exam and i want new project titls for develping

    ReplyDelete
  21. please send me latest dumps on rumi.shareef@gmail.com

    ReplyDelete
  22. A must read :
    " Best way to prepare for OCPJP exam "

    http://www.bubblews.com/news/807922-best-way-to-prepare-for-java-ocpjp67-exam

    ReplyDelete
  23. can u send me latest dump of ocjp exam
    chandansinghavit@gmail.com

    ReplyDelete
  24. I am writing scjp 1.6 next month... can you plz forward latest dumps to srinadhreddy33@gmail.com
    thanks in advance.

    ReplyDelete
  25. Hi .. can u please send me latest dumps on sameera.bakali@gmail.com

    ReplyDelete
  26. Hi, can u please send me latest dumps on vivekbrnl@gmail.com

    ReplyDelete
  27. Hi guys I am planning to write scjp , so can any one send the latest dumps , July 3013 this is my mail I'd srividhyat88@gmail.com

    ReplyDelete
  28. hello everyone.. i'm planning to take up this exam.. can anyone mail me the dumps- darkknight215@rocketmail.com

    ReplyDelete
  29. hello Everyone

    I am also attending OCJP 6,I want to prepare if anybody wants to join me and Please share the dumps @ vinay.kumar03@ymail.com

    ReplyDelete
  30. Can you plzzz send me the latest dumps to ban.arpit23@gmail.com

    ReplyDelete
  31. Can someone please send me SCJP 1.7 latest dumps on my mail id rozer.fedd@gmail.com thanks in advance I am planning to give OCJP next month.

    ReplyDelete
  32. can u send me latest jumps regarding the scjp or ocjp
    to
    my mail id : sknaidu.m@gmail.com

    ReplyDelete
  33. pls send the latest SCJP dumps at shubh.subhasis@gmail.com

    ReplyDelete
  34. pls send the latest SCJP6 dumps at poonampatil168@gmail.com

    ReplyDelete
  35. Hi I am going to write OCJP6, can you please mail me dumps - ketavankalai@gmail.com

    ReplyDelete
    Replies
    1. If you are looking for ocjp/scjp dumps
      find latest dumps and updates at https://www.facebook.com/OCJP6

      Delete
  36. plz send me the lastest dumps on my email-sonalishetti9@gmail.com.. plz its urgent.

    ReplyDelete
  37. Hi,
    Can you please send me ocjp 1.7 latest dumps to arushi.saxena7@hotmail.com.

    Thanks in advance,
    Arushi

    ReplyDelete
  38. Kindly mail me the dumps for 1.6 OCJP on aastha.malik8@gmail.com.I am planning to give next week.

    Thanks
    Aastha

    ReplyDelete
  39. Hi,

    Can you please send me ocjp 1.7 latest dumps to venuatthota@gmail.com

    ReplyDelete
  40. Hi,

    Can you please send me ocjp 1.7 latest dumps to deepakpanda93@gmail.com

    ReplyDelete
  41. Please send the scjp latest dump to crazyjaydey2009@gmail.com

    ReplyDelete
  42. I am planning to take exam by the end of this month, please send me the ocjp 1.7 latest dumps at shahbaz.alam01@gmail.com

    ReplyDelete
  43. Hi guys, i am planning to take ocjpj 1.6 exam next month can you please send me the dumps to this mail id dhineshraja131@gmail.com

    ReplyDelete
  44. Could you please send me the updated OCPJP 7 dumps at
    rajansharmassi@gmail.com

    ReplyDelete
  45. can anyone pls send me the latest Dump for OCJP preparation at rahulkumarnwd1878@gmail.com

    ReplyDelete
  46. Can anyone please send me OCJP 7 and 1.8 dumps at virendra2609@gmail.com

    ReplyDelete