File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

questions

 
JayaSiji Gopal
Ranch Hand
Posts: 303
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens when you write some code to test these scenarios?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic