AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

printing arrays from a file from the run command

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
janicethorne via JavaKB.c
Guest





PostPosted: Thu Apr 20, 2006 4:12 pm    Post subject: printing arrays from a file from the run command Reply with quote



Hello:

My question involves how to set up an array to print from a file that is not
known until you implement the Run command. I know that it is run in the main
method, but don't know the proper syntax for calling them. For example, I
know that (String[ ] args) holds an array of args[0] (my input file) and arg
[1] (my output file). How do I use that to get my data?

Thank you.

--
"The man who does not read good books has no advantage over the man who
cannot read them."

Message posted via http://www.javakb.com
Back to top
Hendrik Maryns
Guest





PostPosted: Thu Apr 20, 2006 5:12 pm    Post subject: Re: printing arrays from a file from the run command Reply with quote



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

janicethorne via JavaKB.com schreef:
Quote:
Hello:

My question involves how to set up an array to print from a file that is not
known until you implement the Run command. I know that it is run in the main
method, but don't know the proper syntax for calling them. For example, I
know that (String[ ] args) holds an array of args[0] (my input file) and arg
[1] (my output file). How do I use that to get my data?

args[0] will be a String, so you probably want new File(args[0]), then
read in the file, and populate some array with it.

Afterwards, you’ll do new File(args[1]) and write out your data to it.
See the whole java IO stuff.

H.

- --
Hendrik Maryns

==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFER7Lxe+7xMGD3itQRAsDuAJoCmTmtOCbbRaQl4YWPCV5HoRVpggCfSg+F
FiJPRPnxsJE6ejGBmeJgswY=
=kiaj
-----END PGP SIGNATURE-----
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.