• Post Reply Bookmark Topic Watch Topic
  • New Topic

confused!  RSS feed

 
Tariqul Islam
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am confused about two things.
A. The declaration of 'finalize' method of the 'Object' class goes like this:
protected void finalize () throws Throwable

The current mock exam that i am going through says when this method is overridden in any class, the overriding method can not throw any checked exceptions. I have a feeling that this statement is false.
B. The same exam says : char c = short.MAX_VALUE will compile ok. The reason it shows is,'short.MAX_VALUE' will be treated as a constant during compilation. I have tried to compile the code but has ended up with a compilation error.
Any comment or confirmation ??
 
Anthony Villanueva
Ranch Hand
Posts: 1055
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A. If you're really interested,follow this thread.
B. You mean char c = Short.MAX_VALUE, don't you? Again, why don't you try this
link
-anthony
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!