Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Free download SCJP 5.0 exam simulator

 
Ranch Hand
Posts: 1087
Oracle Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just got this URL while browsing

http://www.theserverside.com/discussions/thread.tss?thread_id=51759

Shailesh
 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Shailesh Chandra:
Just got this URL while browsing

http://www.theserverside.com/discussions/thread.tss?thread_id=51759

Shailesh



I think that site is an advertisement for Devaka's free exam.
 
Shailesh Chandra
Ranch Hand
Posts: 1087
Oracle Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone who is offering something free will like to have his name on it. BTW owner of this exam is also a rancher. Just saw him on another thread here
 
Kenneth Lomvey
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shailesh,

Did you do that exam? I've complete the diagnostic exam on that simulator and got 54% only :roll:

It is hard in little bit; isn't it?
 
Shailesh Chandra
Ranch Hand
Posts: 1087
Oracle Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Kenneth Lomvey:
Shailesh,

Did you do that exam?



Not yet, probably next weekend, I will surely uodpate you

Shailesh
 
Sheriff
Posts: 6631
1254
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chandra,

Originally posted by Shailesh Chandra:
Anyone who is offering something free will like to have his name on it. BTW owner of this exam is also a rancher.



I made this simulator, only for the purpose of helping to others; and thats only.
 
Shailesh Chandra
Ranch Hand
Posts: 1087
Oracle Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Devaka Cooray:

I made this simulator, only for the purpose of helping to others; and thats only.



I did not mean that you have done this for publicity, I wanted to put a point in response to a other post that if someone has done something, he has full right to take the credit

Shailesh
 
Devaka Cooray
Sheriff
Posts: 6631
1254
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Shailesh Chandra:

I did not mean that you have done this for publicity, I wanted to put a point in response to a other post that if someone has done something, he has full right to take the credit



It's ok.
Thanks for commenting about my simulator
 
Enthuware Software Support
Posts: 4453
41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Excellent work, Devaka
 
Devaka Cooray
Sheriff
Posts: 6631
1254
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Paul Anil:
Excellent work, Devaka



Thanks
 
Ranch Hand
Posts: 488
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should feel good about a 54% Kenneth, I just took the diagnostic exam and got a 43%. :/

Guess I have a lot more studying to do first!!

Thanks for the great program Devaka, looks like it took a lot of time and work!
 
Devaka Cooray
Sheriff
Posts: 6631
1254
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

The diagnostic exam in my simulator is designed to test your current level of preparedness. Actually it is easy than other practice exams in this simulator. As you can see, there are no even drag-and-drop questions in this diagnostic test.

I made all of the questions very carefully, especially for this diagnostic test. Because diagnostic test is the test which tell you about your ability to begin other practice exams. All of the questions in this diagnostic exam are java-concept-oriented.

You should get at least 55% in this diagnostic test, before taking the other practice exams. Dear Kenneth and Brian, you should review your answers with the explanations, and must memorize the Java concepts. Keep reading Kathy Sierra's study guide. I suggest you to retake the diagnostic exam, before going for other practice exams.

Cheers,
[ November 10, 2008: Message edited by: Devaka Cooray ]
 
Brian Legg
Ranch Hand
Posts: 488
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Devaka, I don't know if this is the right place, but would you mind elaborating on question 3 of your Diagnostic Exam?

I can't copy/paste it, but it has a class with a static method then another class extends that class with the same static method in in + throws ArithmeticException.

I understand that ArithmeticException is a run-time exception so that is irrelivant. I also understand that you can't override a static method.

But how come when you say SuperClass sc = new SubClass(); sc.method(); it ran the superclass version of the method and not the subclass? I understand that runtime-polymorphism does not apply here, but isn't there an instance of a SubClass Object on the heap? I am confused, thank you for any tips.
 
Devaka Cooray
Sheriff
Posts: 6631
1254
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, first at all you should know that you CAN copy/paste the program from my simulator. Just click the "Copy Program" button at the review mode. In future, please copy and paste the program here, so others can help you quickly. In this case, please note that you must also mention the name of my simulator, because questions and explanations in this simulator were copywritten by me.

Ok, now following is the Q.No:03 in Diagnostic exam of my examlab:



This is about attempting to override static methods. You are correct that "static" methods cannot be overridden. However, static method CAN be redefined! That is the reason of why this program doesn't generate a compile time error.

In the explanation window, I said "The theory of Runtime-Polymorphism may NOT apply here." because this is not an example of overriding, it's just method redefining.

Remember, invocation of a static method always depends on the REFERENCE type only. In this program, the REFERENCE TYPE of the variable "sc" is SuperClass. Therefore, the method in super class will be called by the statement "sc.printMe();".

If you want to read more, please visit the following page in JavaRanch:
http://faq.javaranch.com/view?OverridingVsHiding


There will be lot of questions like this in the real exam. Therefore you must be concentrated with object oriented concepts.

Cheers
 
Brian Legg
Ranch Hand
Posts: 488
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Remember, invocation of a static method always depends on the REFERENCE type only"

Thank you, that was the key information I was lacking. Ok, so you can NOT override a static method and when you call the static method it refers to the reference type, not the actual Object type.

Time to go review polymorphism rules yet again.
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the explanations, and, by the way, for this nice training soft

I have still a question, which has not been tackled in the Javaranch FAQ about Overriding and Hidding.
Add the public static void printMe() is Hiding and not Overriding it's ok.
But I don't understand why this method cannot throws a checked exception.. (In the question code,this is an unchecked so the problem does not appear).
If we add, for instance, throw IOException to the SubClass.printMe() method, the compilation fails and the message is "IOException is not compatible with throw clause in SuperClass.printMe()."

If we consider that this method is dedicated to the Class "Subclass", why is it forbidden to declare a dedicated exception ?

Thanks in advance

G.
 
Ranch Hand
Posts: 757
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guillaume,
Welcome to JavaRanch.

Please read this, as first.
 
Let nothing stop you! Not even this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic