Results 1 to 4 of 4
Thread: throwing Exception
- 11-09-2007, 06:24 PM #1
Senior Member
- Join Date
- Nov 2007
- Posts
- 111
- Rep Power
- 0
throwing Exception
I want to throw exception manually. I tried the following but it fails.
I get following exception:Java Code:throw java.lang.ArrayIndexOutOfBoundsException;
Please advice.Java Code:Exception in thread "main" java.lang.Error: Unresolved compilation problem: java.lang.ArrayIndexOutOfBoundsException cannot be resolved
- 11-09-2007, 07:50 PM #2
What does your method signature look like?
- 11-09-2007, 09:21 PM #3
Senior Member
- Join Date
- Nov 2007
- Posts
- 111
- Rep Power
- 0
Actually method has nothing to do with this. I want to know, can I raise an exception myself?Java Code:public void calculateSum() { ... }
- 11-09-2007, 09:35 PM #4
Similar Threads
-
Main method throwing specific Exception
By bugger in forum New To JavaReplies: 5Last Post: 05-13-2009, 02:34 PM -
exception
By Oktam in forum New To JavaReplies: 2Last Post: 03-23-2008, 07:01 PM -
Trouble with factory method - unhandled exception type Exception
By desmond5 in forum New To JavaReplies: 1Last Post: 03-08-2008, 06:41 PM -
Exception
By Camden in forum New To JavaReplies: 2Last Post: 11-26-2007, 11:50 PM -
Which statement is throwing a runtime error....
By money123 in forum New To JavaReplies: 1Last Post: 07-30-2007, 12:55 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks