Parsing integers

P

ptoum

I am a novice in Java and I want to create a program that parses
integers (for example dates) that the user writes to the keyboard and
gives an output on a command line. Does anyone know? Thanks a lot!
 
A

Andrew Thompson

I am a novice in Java ..

Java novices are best helped on a different group..
..and I want to create a program that parses integers ...

Integer.parseInt(String)[1] as mentioned in the JavaDocs[2]
(an invaluable resource)

[1]
<http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html#parseInt(java.lang.String)>
[2]
..(for example dates) ..

...or Date.parse(String)
..that the user writes to the keyboard and
gives an output on a command line. Does anyone know?

Know what? You have not asked any specific questions.
..Thanks a lot!

You're welcome.
 
M

marcus

ptoun,
Andrew is too nice.
A date (or whatever) entered from the keyboard is not an integer. It is
data read from an input stream. The words 'integer' and 'parse' have
specific meanings, so it is important that you understand them. Use
care if you are using a translating program, because it may choose a
word that has more specificity than you intended. So, you must learn
the vocabulary in english before you can post effectively.

Second, you must be able to clearly conceptionalize what you want to do
and be able to express it accurately before you will be able to program
it effectively. Posting a vague question here won't get you very far.

Get some books and go through the java tutorial on sun's website.

Good Luck!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top