aspose file tools*
The moose likes Beginning Java and the fly likes exceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "exceptions" Watch "exceptions" New topic
Author

exceptions

prans rao
Greenhorn

Joined: Aug 08, 2008
Posts: 9
when i run a java program with "Integer.parseInt" in it,
i am getting an error "Array index out of bounds "exception at
that step. But it not showing any compilation error.
Every program i write with that step, i am getting error.
I want to enter values at runtime manually through this, but i am getting that exception.
Here is my one of programs i am getting error.


Here i am getting Exception at "int a1=.."

JCE: please use code tags, they make your code more readable.
[ August 08, 2008: Message edited by: Joe Ess ]
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8908
    
    8

In the first line of your main method, try printing out the length of the string array s:

Let us know what you get.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19695
    
  20

Please CarefullyChooseOneForum. This has nothing to do with I/O.

I'm sure Joe can move this to the beginner's forum.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: exceptions