|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
what's wrong?
public class TestCatch
{ public static void main(String arg[]) { Integer index = null; try { System.out.println("Try" + (index.parseInt(arg[0])) / (index.parseInt(args[1]))); System.out.println("have no Exception"); } catch(IndexOutOfBoundsException IE) { System.out.println("IndexOutOfBoundsException"); E.printStackTrace(); } catch(ArithmeticException AE) { System.out.println("ArithmeticException"); E.printStackTrace(); } } } |
|
#2
|
|||
|
|||
|
More info please
- What is the error you encounter? - What doesn't work Erwin |
|
#3
|
||||
|
||||
|
try :
class TestCatch { public static void main(String arg[]) { Integer index = null; try { System.out.println("Try" + (index.parseInt(arg[0])) / (index.parseInt(args[1]))); System.out.println("have no Exception"); } catch(IndexOutOfBoundsException IE) { System.out.println("IndexOutOfBoundsException"); E.printStackTrace(); } catch(ArithmeticException AE) { System.out.println("ArithmeticException"); E.printStackTrace(); } } } |
|
#4
|
|||
|
|||
|
- What is the error you encounter?
- What doesn't work Erwin |
|
#5
|
|||
|
|||
|
IE.printStackTrace();
and AE.printStackTrace(); |
|
#6
|
||||
|
||||
|
Vagrant, that's an unacceptable topic and an unacceptable post. Please read this: http://www.tuxedo.org/~esr/faqs/smart-questions.html before posting again.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > what's wrong? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|