aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "questions" Watch "questions" New topic
Author

questions

JayaSiji Gopal
Ranch Hand

Joined: Sep 27, 2004
Posts: 303
1) if i have a class with methods that accept a long as a parameter and i pass an int, wht will be the result? will it compile? any runtime exception?

2) if i have a class accepting an object and if i pass an integer, will it compile? will it throw any excpetion?

3)in the above scenario which is the situation, when it will throw compile time error, saying method not found.

4) if i pass null to a method and there are two versions of the method, one accepting string and the other accepting stringbuffer, which will be invoked? and y?

5) same as q 4, but now i have two methods, one accepting object and the other accepting a string. wht wud happen?


SCJP 1.4, SCWCD 1.4<br /> <br />Thanks in advance!<br />Jayashree.
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
What happens when you write some code to test these scenarios?


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: questions