wood burning stoves*
The moose likes Beginning Java and the fly likes A flaw in java arrays. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "A flaw in java arrays." Watch "A flaw in java arrays." New topic
Author

A flaw in java arrays.

VIGNESHWAR VISWANATHAN
Greenhorn

Joined: May 26, 2007
Posts: 17

The above is a program to type in command line .
but if you run the program by
java ArrayCmd hi hello
Then the output is just hihello
The compiler just ignores the spaces while considering the arrays.
Tell me why this problem exists and specify meother alternate to this..
Thanks in advance
raj malhotra
Ranch Hand

Joined: Feb 22, 2007
Posts: 285
Here space is used as delimiter and not as token.And It is not a flaw.
Thanks
[ June 14, 2007: Message edited by: raj malhotra ]
VIGNESHWAR VISWANATHAN
Greenhorn

Joined: May 26, 2007
Posts: 17
Then how to include spaces....Mr.Raj Malhotra
John Stone
Ranch Hand

Joined: May 04, 2007
Posts: 332
What about put there space by yourself? :-)
John Stone
Ranch Hand

Joined: May 04, 2007
Posts: 332
or


should help to preserve spaces.
[ June 14, 2007: Message edited by: John Stone ]
VIGNESHWAR VISWANATHAN
Greenhorn

Joined: May 26, 2007
Posts: 17
thank you.Im just a beginner.Would i be able to take my exams this month end.Please tell me suggestions
Andris Jekabsons
Ranch Hand

Joined: Jan 20, 2004
Posts: 82
Take some mock exams (for example, the Javaranch mock exam) and see how you score.
Kaydell Leavitt
Ranch Hand

Joined: Nov 18, 2006
Posts: 689

The "Rules Roundup" mock exam is easier than the real exam.

Kaydell
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Im just a beginner


Can I suggest then that you consider placing your beginner's questions in our Java In General (Beginner) forum?


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Jenson Chew
Ranch Hand

Joined: May 27, 2007
Posts: 55
Originally posted by VIGNESHWAR VISWANATHAN:
thank you.Im just a beginner.Would i be able to take my exams this month end.Please tell me suggestions


Hi,

I'm a beginner too. I think you should at least finish learning the basic of core Java first before you are ready for the exam? Or you decided to cram for it?

Regards,
Jenson


:: Vision is Power ::
David McCombs
Ranch Hand

Joined: Oct 17, 2006
Posts: 212
IMO, if you are truly a beginner you should not even consider taking certification exams until you not only understand Java, but can program competently as well.

If you somehow passed the exam but can't program it will do you very little good, if any. It will also devalue the certification.

IMO, they are barely worth the paper they are written on. AFAIK, there is no educational and/or experience requirements, at least in the more general Java tests,like more valuable certificates, but unrelated to Java, like CISSP.

I know this is a bit off the original topic, but something to consider.
[ June 15, 2007: Message edited by: David McCombs ]

"Should array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration."- Stan Kelly-Bootle
 
jQuery in Action, 2nd edition
 
subject: A flaw in java arrays.