Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search Coderanch
Advance search
Google search
Register / Login
Sakthi velan
Greenhorn
+ Follow
3
Posts
1
Threads
0
Cows
since May 12, 2011
Merit badge:
grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
Ranch Hand Scavenger Hunt
Number Posts (3/100)
Number Threads Started (1/100)
Number Cows Received (0/5)
Number Likes Received (0/10)
Number Likes Granted (0/20)
Set bumper stickers in profile (0/3)
Report a post to the moderators (0/1)
Edit a wiki page (0/1)
Create a post with an image (0/2)
Greenhorn Scavenger Hunt
First Post
Number Posts (3/10)
Number Threads Started (1/10)
Number Likes Received (0/3)
Number Likes Granted (0/3)
Set bumper stickers in profile (0/1)
Set signature in profile
Search for a post/thread (0/3)
Set a watch on a thread
Save thread as a bookmark
Create a post with an image (0/1)
Recent posts by Sakthi velan
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
Thanks a lot. It worked.
show more
12 years ago
Java in General
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
Thanks for the immediate reply.
I am using Eclipse IDE to run it. How will I give the inut parameters in that?
show more
12 years ago
Java in General
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
Getting an ArrayIndexOutOfBoundsException.
I am just trying to get input of two values.
Below is my code. Can any one please help me.
public class Test { public Test() { // TODO Auto-generated constructor stub } public int execute(int op1, int op2){ return op1 + op2; } public void printresult(String[] args){ int op1 = Integer.parseInt(args[0]); int op2 = Integer.parseInt(args[1]); System.out.println("The First value: " + op1); showresult("Reult is " + args + execute(op1, op2)); } private void showresult(String result) { // TODO Auto-generated method stub System.out.println(result); } /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Test calc = new Test(); calc.printresult(args); } }
show more
12 years ago
Java in General