jQuery in Action, 2nd edition*
The moose likes Beginning Java and the fly likes What is the input file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What is the input file?" Watch "What is the input file?" New topic
Author

What is the input file?

petr pavlovich
Greenhorn

Joined: Jul 10, 2011
Posts: 22
can we consider an array arr[] of input file in my program?
Or I should somehow to another enter a array?

input file:
"ddd"
"sss"
" aaa"
"ggg"
" aaa "
"bbb"
"ddd", "ccc
John Jai
Bartender

Joined: May 31, 2011
Posts: 1776
Hi Petr,
Kindly explain your question more clearly
can we consider an array arr[] of input file in my program? Or I should somehow to another enter a array?

You mean to say the input array will reside in a file and read the File? Or you want a user to enter your array? What code modification you need to do?
petr pavlovich
Greenhorn

Joined: Jul 10, 2011
Posts: 22
ox.
sorry.
my bad English. (google translator)


I do not understand the meaning of these words:
The name of the input and the path to the output files specified(it is set/given) in the form of two command line parameters.
.............................................................................................................. (in the form of two parameters command line)
indicate that these words?

each input file has a name?
that the two options(parameters)?
in my case is whether the array input file?(my array - the input file?)
Greg Brannon
Bartender

Joined: Oct 24, 2010
Posts: 557
I'll take a shot at explaining the words you highlighted:

The name of the input and the path to the output files specified(it is set/given) in the form of two command line parameters.


This means that when the Java program is run from the command line, 2 command line parameters are specified, the name of the input file and the path and name of the output file. For example:

C> java myProgram NameOfInputFile c:/path/NameOfOutputFile

The words you posted leave some room for interpretation, but that's the best I can do.


Learning Java using Eclipse on OpenSUSE 11.2
Linux user#: 501795
petr pavlovich
Greenhorn

Joined: Jul 10, 2011
Posts: 22
thanks Greg Brannon


C> java myProgram NameOfInputFile c:/path/NameOfOutputFile

.


how to connect it with my program?
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

The args argument that the main method gets contains the command line parameters. For example:


C:\Temp>java Example hello petr
args[0] = hello
args[1] = petr


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
petr pavlovich
Greenhorn

Joined: Jul 10, 2011
Posts: 22
as I enter the array app from an input file using BufferedReader?
that the program to use an array app instead arr.
The name of the input and the path to the output files specified(it is set/given) in the form of two command line parameters.


I so have understood my problem.=)

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: What is the input file?
 
Similar Threads
following::* doubt
I do not know
Prompt algorithm
Ignoring of blanks
beginner