Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old September 13th, 2002, 12:47 AM
vagrant vagrant is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Posts: 0 vagrant User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to vagrant
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();
}

}
}

Reply With Quote
  #2  
Old September 16th, 2002, 08:32 AM
EHendriks EHendriks is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Location: Amersfoort, The Netherlands
Posts: 10 EHendriks User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 sec
Reputation Power: 0
More info please

- What is the error you encounter?
- What doesn't work

Erwin

Reply With Quote
  #3  
Old September 17th, 2002, 06:07 AM
kittykiller's Avatar
kittykiller kittykiller is offline
Golden Member =p
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Final Frontier
Posts: 9 kittykiller User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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();
}

}
}

Reply With Quote
  #4  
Old September 17th, 2002, 06:31 AM
EHendriks EHendriks is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Location: Amersfoort, The Netherlands
Posts: 10 EHendriks User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 sec
Reputation Power: 0
- What is the error you encounter?
- What doesn't work

Erwin

Reply With Quote
  #5  
Old September 17th, 2002, 12:50 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
IE.printStackTrace();

and

AE.printStackTrace();

Reply With Quote
  #6  
Old September 17th, 2002, 09:33 PM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > what's wrong?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway