File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Head First Android
this week in the
Programmer Certification (SCJP/OCPJP)
Joined: Sep 27, 2004
Dec 26, 2004 01:12:00
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
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.
Joined: Aug 03, 2002
Dec 26, 2004 01:16:00
What happens when you write some code to
Ask a Meaningful Question
Getting someone to think and try something out is much more useful than just telling them the answer.
I agree. Here's the link:
About null ...
Varargs and arrays - Mughal's mock exam, question 60
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015