Java Console based application

Hi,

I am writing a console based application where in I need to take several parameters from the console. I need to take some arrays and some plane aruments like int and string. The number of arguments becomes more than 25, if i take everytihing from the command line. So, i was thinking is there a way to supply the arguments in smaller numbers. I mean may be i can accept the arrays and then other arguments. I just wanted to know the best way to do this. What i mean is this:

class A{

doSomething(String name, String[] dept,int age,int[] something){

//do something

}

}

so from the command line i can do:

java A ramu df fdf df df 1 4 6 5 6

instead of this i want to do this

java A ramu <CARRIAGE RETURN>

df fdf df df <CARRIAGE RETURN>

1 <CARRIAGE RETURN>

4 6 5 6 <CARRIAGE RETURN>

so that it is easy for the user to enter the arguments.

Thanks in advance.

Praveen

[1228 byte] By [alvandipa] at [2007-11-27 8:49:19]
# 1
You can certainly do something like this but rather than putting it in when the user types java yourclassname you should do it from inside your program with something like a Scanner reading from System.in.
cotton.ma at 2007-7-12 20:58:19 > top of Java-index,Java Essentials,Java Programming...
# 2

> You can certainly do something like this but rather

> than putting it in when the user types java

> yourclassname you should do it from inside your

> program with something like a Scanner reading from

> System.in.

I didnt understand what you mean.

alvandipa at 2007-7-12 20:58:19 > top of Java-index,Java Essentials,Java Programming...
# 3
Look here: http://java.sun.com/javase/6/docs/api/java/util/Scanner.html
sonixx1408a at 2007-7-12 20:58:19 > top of Java-index,Java Essentials,Java Programming...