John Bonham was stronger, but Keith Moon was faster.
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Originally posted by Barry Gaunt:
Steve, you cannot use charAt(int) on an int.
An int is a integer primitive not a String object.
Do you really mean args.length? That's the number of arguments present on the command line. args[0].length() is the length of the first argument. E.g, if you do java Say 42 the args[0].length() is 2.
-Barry
Oh! the pleasures of Java-4a and the torments of Java-4b to comeKeep at it Steve you'll get there, but read your java books a bit more.
BTW I am still being tortured by Java-4b myself, if that helps a little.
[ December 22, 2002: Message edited by: Barry Gaunt ]
John Bonham was stronger, but Keith Moon was faster.
Originally posted by Steve Jensen:
OK, but i thought that we had converted the int to a String type using
num = Integer.parseInt ( args[0] );
Originally posted by Michael Matola:
Nope. Other way 'round. The above code converts the String into an int.
John Bonham was stronger, but Keith Moon was faster.
Originally posted by Steve Jensen:
OK then, before i delve back to my books, just as a pointer, what chapters of a Java text book should I be looking at in particular, to solve the problems i'm facing??![]()
"I'm not back." - Bill Harding, Twister
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Originally posted by Barry Gaunt:
my hands are tied.
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
bacon. tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|