File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A flaw in java arrays.

 
VIGNESHWAR VISWANATHAN
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 288
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then how to include spaces....Mr.Raj Malhotra
 
John Stone
Ranch Hand
Posts: 332
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about put there space by yourself? :-)
 
John Stone
Ranch Hand
Posts: 332
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
or


should help to preserve spaces.
[ June 14, 2007: Message edited by: John Stone ]
 
VIGNESHWAR VISWANATHAN
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 82
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take some mock exams (for example, the Javaranch mock exam) and see how you score.
 
Kaydell Leavitt
Ranch Hand
Posts: 689
Eclipse IDE Firefox Browser Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "Rules Roundup" mock exam is easier than the real exam.

Kaydell
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im just a beginner


Can I suggest then that you consider placing your beginner's questions in our Java In General (Beginner) forum?
 
Jenson Chew
Ranch Hand
Posts: 59
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
David McCombs
Ranch Hand
Posts: 212
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic