Results 1 to 6 of 6
Thread: length and excepton
- 06-28-2010, 02:53 AM #1
Member
- Join Date
- Jun 2010
- Posts
- 2
- Rep Power
- 0
-
The above code looks like randomly placed words. What are you trying to achieve? You can't make up syntax and expect it to work.
-
And by the way, it doesn't throw an exception but rather causes a compilation error. There's a difference that will help you to learn about.
- 06-28-2010, 04:40 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
- 06-28-2010, 04:58 PM #5
Member
- Join Date
- Jun 2010
- Posts
- 2
- Rep Power
- 0
length() method and excepton
I am very happy by looking the replyes....thanks ....
I am actually trying to understand the Exception classification along with examples.
I know that, when we compile it will not compile.
In broad level exceptions are 1. Unchecked exceptions ( run time )
2. checked exceptions ( compile time )
Under which catagory my exception(e.length()) will come, is it under checked exception ?
On what base these two are classified ???
Can I have smalll example for these both types, Plz..... ???
I referred couple of books but they are confusing me .....
- 06-28-2010, 11:06 PM #6
Senior Member
- Join Date
- Mar 2010
- Posts
- 953
- Rep Power
- 4
This is really not a good description of checked and unchecked exceptions. Exceptions are always runtime. The difference with checked exceptions is that the compiler requires you to either:
a) handle the exception, or
b) declare in your method signature that the exception may be thrown.
The exception itself is still something that would be thrown at runtime, but the compiler requires you to explicitly declare how it should be handled.
Hope that helps,
-Gary-
Similar Threads
-
Increase signature length?
By xcallmejudasx in forum Suggestions & FeedbackReplies: 3Last Post: 12-18-2008, 06:04 PM -
what does num.length method does?
By kris09 in forum New To JavaReplies: 1Last Post: 08-07-2008, 10:19 PM -
queue length of Socket
By hemant in forum NetworkingReplies: 6Last Post: 07-13-2008, 06:28 PM -
Integer length
By jithan in forum New To JavaReplies: 1Last Post: 06-12-2008, 03:35 PM -
Help with method length
By toby in forum New To JavaReplies: 1Last Post: 07-25-2007, 08:29 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks