Guys,
This is my first post. So, hello to everyone
Am using Jcreator and i have writtern a simple program to accept two numbers and compare them to see which is bigger.
Problem am facing is, i am not able to give my inputs to the program when i "Run Project" using Jcreator!! It runs and throws the below error..
This is to find maximum of two numbers
Enter the First Number
Length :0
java.lang.ArrayIndexOutOfBoundsException: 0
at maxTwo.main(maxTwo.java:18)
Exception in thread "main"
Process completed.
But i can run the same program via command prompt and get the correct output as below
D:\Official\Java Apps>java maxTwo 45 43
This is to find maximum of two numbers
Enter the First Number
Length :2
Enter the Second Number
First number45is greater than43
Please suggest.