Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

SCJP5.0 passed!!

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

thank you all! I have passed the SCJP5.0 today with 87%. Worst result was on API (70%), I have really bad memory. :-)

To contribute something back to the community, here is my "cheat sheet":
  • top level classes can only be "default", public, static or final
  • wait() and notify*() only in synchronized code
  • private constructor can not be called from constructor of subclass.
  • there is automatic narrowing conversion of literals and final variables for byte, short, char, int (if fits to new range)
  • array creation: given size, or initializer, not both!
  • non-public main() compiles, but doesn't run.
  • implicit method modifiers in interfaces: public abstract
  • implicit field modifiers in interfaces: public static final
  • if the subclass overrides a method, then the parent constructor calls the overriding one.
  • member variables are resolved at compile time
  • (int)-2.9 == -2
  • there can be method with the same name as the constructor. It even can return void.
  • "byte" += "int" compiles and works (possibly loose prec.)
  • Arrays of generic type: only unbounded wildcards.
  • private is private to the class, not to the object
  • final field must be initialized in initializer, constructor, or at the place of declaration
  • static final field must be initialized in static initializer or at the palce of declaration
  • static fields/methods/classes can be declared only in static or top-level classes.
  • Set, List and Map strenghten the requirements on equals and hashCode contracts
  • It is possible to declare variables of abstract types.
  • Externalizable class must have no-args constructor
  • default serialization writes non-static and non-transient fields.
  • It is not possible to convert or cast arrays of primitives.


  • Thanks again!

    Jan
     
    Ranch Hand
    Posts: 59
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    congratulations Jan xD

    soon, I will do the test, I'm sturdying here too, I believe I will pass, I'll try

    bs []'s
     
    Ranch Hand
    Posts: 48
    Eclipse IDE Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hey congrats ... 87% is a lot above average... so chill...!!
    Do u know khalid Moghuls edition for java 1.5..?
     
    Sheriff
    Posts: 11343
    Mac Safari Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Congratulations Jan!

    I was going to move this to the Results forum, but I think there are a couple of "tips" that warrant clarification here...

    Originally posted by Jan Valenta:
    top level classes can only be "default", public, static or final


    Top level classes cannot be static. They can, however, be abstract or strictfp.

    Originally posted by Jan Valenta:
    It is possible to declare variables of abstract types


    "abstract" applies to interfaces (implicitly), classes, or methods. It does not apply to variables.
     
    Greenhorn
    Posts: 23
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Congrats jan...

    Thanks for your "Cheat sheet".
     
    Ranch Hand
    Posts: 88
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Congrates Jan.
    I did not understand 2 posints from the cheet.
    1.It is possible to declare variables of abstract types.
    2.if the subclass overrides a method, then the parent constructor calls the overriding one.
    Please give me an example for this.
    Regards,
    Sri.
     
    Ranch Hand
    Posts: 89
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Great ya...
    congrats...
     
    Jan Valenta
    Ranch Hand
    Posts: 32
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Marc, thanks for clarification about the top level classes. I forgot to mention that the list is provided "AS IS", no warranty, no responsibility, bla bla bla... :-)

    Sri, see bellow.

    1.It is possible to declare variables of abstract types.




    2.if the subclass overrides a method, then the parent constructor calls the overriding one.



    this codes outputs "Derived.method()" twice. That's what I meant by this point.

    Cheers,
    Jan
     
    Ranch Hand
    Posts: 63
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi jan
    Congrats first of all for shooting such a good score..Is it possible to provide some details on few of the follwoing lines form the cheat sheets:

    1. member variables are resolved at compile time

    2. Externalizable class must have no-args constructor
    3. default serialization writes non-static and non-transient fields

    Then was there a lot of questions relating to files/streams.. Need to go thru that too. Alright please find some time for reply.

    thanks..

    Balaji.S
     
    Ranch Hand
    Posts: 57
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    hi Jan Valenta Cong can u tell me the best way to prepare for the exam .Need to buy any book or enough of taking the mock exam ..?
     
    marc weber
    Sheriff
    Posts: 11343
    Mac Safari Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Jan, I see now what you meant about "variables of abstract types." I had misinterpreted what you were saying. You are correct.
     
    Jan Valenta
    Ranch Hand
    Posts: 32
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi all,

    thanks for all the congratulations. :-)

    Balaji:

    1. member variables are resolved at compile time





    2. Externalizable class must have no-args constructor
    3. default serialization writes non-static and non-transient fields


    What to add?? These are just facts..

    It is definitelly worth to write a couple of simple programs with streams, there are drag&drop questions about them.

    Arul,
    I think the mocks are enough only if you are both very experienced and very well theoretically educated. I definitely recommend some text/book where stuff is well organized, etc. I have used Heller, Roberts: Copmlete Java 2 Certification Study Guide, Fifth edition, and couple of other texts on generics, collections and streams, mostly tutorials from sun.com.

    Marc,
    sorry for not being clear, I should still study some English. :-)
     
    Balaji Sampath
    Ranch Hand
    Posts: 63
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi jan
    Thanks a lot!! Will deifnitely bug you once the exam date come closer. Btw im planning sometime in jan.. not sure abt the date..

    regards
    Balaji.S
     
    Bartender
    Posts: 3750
    39
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Congratz !!!
     
    Aaaaaand ... we're on the march. Stylin. Get with it tiny ad.
    free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
    https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
    reply
      Bookmark Topic Watch Topic
    • New Topic