Dear ALL..
I am a very beginner to Java and now learning it.Here some little point I want to know clearly.
[edit]Add code tags. CR[/edit]
I made the above program but have error.The idea is to accept the command line arguments and display how many arguments are there.
I can make it by the following alternative way.However..I also would like to know why question for my first program.
Thank you..">
Vikas Kapoor
Ranch Hand
Joined: Aug 16, 2007
Posts: 1374
posted
0
Hello Ye,
Welcome to JavaRanch!
I made the above program but have error
I can successfully compile and run it at my end. What error is that?
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32708
4
posted
0
Welcome to JavaRanch Please use the CODE button; I have edited your original post so you can see how much better it looks.
campbell@linux-747u:~/java> java readArgs Campbell Ritchie Ye Zeya
Campbell
Ritchie
Ye
Zeya
The Number of Arguments = 4
I can see no errors; please supply more details of your problem.
ye zeya
Greenhorn
Joined: Oct 31, 2008
Posts: 3
posted
0
Arr....Sorry for my childish carelessness. I compiled the program with wrong name readArgs2 in stead of renaming the former program readArgs.java .So the main class does not match the file 's name . .Really sorry for my fault.
Thank you for your kind helps.Next time I will try to avoid such funny mistakes.
Vikas Kapoor
Ranch Hand
Joined: Aug 16, 2007
Posts: 1374
posted
0
NeverMind.
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32708
4
posted
0
We all do things like that
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.