Ask your own question, for FREE!
Computer Science 8 Online
OpenStudy (anonymous):

Hi, need help with java My java program reads a input text file and does something with it After compiling in console, I want to run from the command line For example: java RecognisingPalindrome the refers to the input file. Can someone please link me to a tutorial on this. I know its got something to do with passing arguments.

OpenStudy (rsmith6559):

Assuming that you have the args ( or argv ) array of strings in main, you just index through it. main( String[] argv ) Most languages (I think Java is off by one) argv[0] is the program called, argv[1] would be file path.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
1 day ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
1 day ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!