• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

OCA book question

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey everyone, I am currently studying the OCA Java SE 8 Programmer in page 7 and 8 saysthe following:
Let’s see how to use the args parameter. First we modify the Zoo program to print out
the fi rst two arguments passed in:
args[0] accesses the first element of the array. That’s right: array indexes begin with 0
in Java. To run it, type this:

My question is where should I type

in order to get the following output:
The output is what you might expect:
Bronx
Zoo

I will really apreciate your help.
 
Greenhorn
Posts: 20
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From the command line in the folder where you placed the *.java file.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I have the same problem, and if I put this code into command line it says that:

'$' is not recognized as an internal or external command,
operable program or batch file.

Any ideas? Thanks a lot!
Izabella
 
Greenhorn
Posts: 4
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Izabella,
The $-sign in the book means that you have to type something at the command prompt. You can leave the character out and type only the words.

Good luck!
Gertjan
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic