Results 1 to 13 of 13
Thread: What are command-line arguments?
- 03-15-2012, 05:16 PM #1
- 03-15-2012, 05:19 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,408
- Blog Entries
- 7
- Rep Power
- 17
Re: What are command-line arguments?
What do the tutorials have to say about them? You did read the tutorials did you?
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 03-15-2012, 05:26 PM #3
Re: What are command-line arguments?
I did read the tutorials earlier. They only show you how to use them but now what they are.
- 03-15-2012, 05:28 PM #4
Re: What are command-line arguments?
Command line arguments are what a user of the program would put on the command line when starting the program.what they are.
- 03-15-2012, 05:33 PM #5
Re: What are command-line arguments?
But why would you use the command line?
- 03-15-2012, 05:35 PM #6
Re: What are command-line arguments?
Many of the programs on a computer use the commandline to get their arguments.
When you double click on a .txt file, the editor is called with the name of the .txt file passed to it on the command line.
- 03-15-2012, 06:13 PM #7
Re: What are command-line arguments?
okay. but WHYYYYYYYYYYYYY?
- 03-15-2012, 06:15 PM #8
Re: What are command-line arguments?
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 03-15-2012, 06:23 PM #9
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
- 03-15-2012, 06:26 PM #10
Re: What are command-line arguments?
Actually, the tutorial contains several examples of "what they are" and why they are used: Command-Line Arguments (The Java™ Tutorials > Essential Classes > The Platform Environment)
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 03-15-2012, 09:16 PM #11
Re: What are command-line arguments?
hi,
command line argument is used to provide value/data to the program at the execution time of the program.
we can use it ,for such a program where we have to provide data at the time of execution of program.
as for example...
suppose we have developed such a program, in which at run time have to enter user name and password,
and if the user name & password is wrong, then program will not execute ,otherwise program will execute.
INPUT/OUTPUT
if you have knowledge about static method ,then you will easly understand it.
actually for execution of the code JVM used the class name to invoke main() method,
it is invoke like this....
String s[]=new String[] {"raj"},{"pass"};// here at command line argument two argument is entered ,"raj" & "pass"
class_name.main(<arguments>);
if we don't enter any value ,then instead of string it place 0(Zero) in the subscript, & execute the main() method...
- 03-16-2012, 02:30 AM #12
Re: What are command-line arguments?
Most of what you state is already in the linked tutorial and hence it wasn't necessary to repeat it here; the rest is either irrelevant or wrong.
I suggest you review and learn how to correctly write Array Initializers.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 03-18-2012, 10:59 PM #13
Similar Threads
-
Command-Line Arguments
By smvolt in forum EclipseReplies: 6Last Post: 12-21-2011, 01:48 PM -
command line arguments
By shruthichandru in forum New To JavaReplies: 11Last Post: 11-20-2010, 02:02 AM -
command line arguments
By jttslg in forum Advanced JavaReplies: 23Last Post: 03-24-2010, 05:06 PM -
Command Line Arguments
By Nakira in forum NetBeansReplies: 10Last Post: 02-04-2010, 03:45 PM -
Command line arguments help
By may88 in forum New To JavaReplies: 8Last Post: 12-08-2009, 01:20 PM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks