• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What is the input file?

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?)
 
Bartender
Posts: 563
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
petr pavlovich
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Greg Brannon



C> java myProgram NameOfInputFile c:/path/NameOfOutputFile

.



how to connect it with my program?
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
petr pavlovich
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.=)

 
reply
    Bookmark Topic Watch Topic
  • New Topic