input/output

H

Hakusa

I need a beginner's way to handle input and output. The teacher who
used to teach Java at my school (which was dropped by the school due
to the apocalyptic standardization of Michigan schooling) said that it
was way too advanced for me to learn at this point. And my main goal
right now is data conversions for a project.

So does anyone know of some code I can get online that's free to use
in whatever I want? Or do you guys maybe disagree with my teacher and
think that I SHOULD learn input on my own?

And in case you were wondering, yes, the teacher did have some
materials for me, but it hasn't worked uot too well, being dependent
on him.
 
K

Knute Johnson

I need a beginner's way to handle input and output. The teacher who
used to teach Java at my school (which was dropped by the school due
to the apocalyptic standardization of Michigan schooling) said that it
was way too advanced for me to learn at this point. And my main goal
right now is data conversions for a project.

So does anyone know of some code I can get online that's free to use
in whatever I want? Or do you guys maybe disagree with my teacher and
think that I SHOULD learn input on my own?

And in case you were wondering, yes, the teacher did have some
materials for me, but it hasn't worked uot too well, being dependent
on him.

I don't think Java is too complicated anybody over the age of about 12.
And a smart 10 year old ought to be able to learn simple programming
with Java.

Why don't you post some more information about what you are trying to do
and what you've tried so far. Unless your problem is getting it to
compile then post compilable code.

Let us know which OS and JDK version you are using.

You can always ask specific questions here or maybe preferably on
comp.lang.java.help. That is the place that beginners are being sent.

If you haven't looked at the Java Tutorial, you should. It is here:

http://java.sun.com/docs/books/tutorial/index.html
 
C

Chris Smith

I need a beginner's way to handle input and output.
[...]And my main goal right now is data conversions for a project.

So does anyone know of some code I can get online that's free to use
in whatever I want?

Can you be more specific? The terms "input" and "output" cover a large
part of everything that computers do. It would be impossible to provide
useful code that covers a significant part of that task. The term "data
conversions" is similarly broad.

Do you want to read and write files, or something else? What kinds of
information are you inputting or outputting? Where does it come from?
Text or binary? Is the format up to you, or do you have to read data in
some other format designed by or written by someone else? If it's
another format, can you tell us anything about it?

File I/O code can be trivial, or it can be mind-numbingly difficult,
depending on the nature of the task. In the best case, you may only
need to know about some pre-existing API method that does everything you
need. In the worst case, you would need to bone up on artificial
intelligence! Somewhere in the middle lie most common I/O tasks, all
the way from simple formats that can be read with StringTokenizer up
through complex formats that require techniques taught in compiler
design classes at universities.

If you want to do I/O to something other than files (e.g., a network or
IPC pipe), then a little bit of it remains the same, but many of the
main concerns are entirely different again.
Or do you guys maybe disagree with my teacher and
think that I SHOULD learn input on my own?

How could we possibly know? We don't know anything about you, or the
problem you're trying to solve.
 
L

Luc The Perverse

I need a beginner's way to handle input and output. The teacher who
used to teach Java at my school (which was dropped by the school due
to the apocalyptic standardization of Michigan schooling) said that it
was way too advanced for me to learn at this point. And my main goal
right now is data conversions for a project.

So does anyone know of some code I can get online that's free to use
in whatever I want? Or do you guys maybe disagree with my teacher and
think that I SHOULD learn input on my own?

And in case you were wondering, yes, the teacher did have some
materials for me, but it hasn't worked uot too well, being dependent
on him.

#1 - If you can read, you can teach yourself anything. It just takes time
and patience.

#2 - Nothing is "too advanced" - it is more important that you do things
that are interesting to you than things which are appropriate skill level.
Java I/O is not as complex as quantum physics (and yes, some people have
taught themselves to the level of quantum physics)

#3 - Google is your friend - but be wary of cut and paste "learning"
Simply making compilable code does not mean you have learned anything if you
cannot replicate it. Needing "notes" is one thing, especially early on -
having to cut and paste every time is not.

#4 - There are tutorials all over the web and good material in the book
shop. I enjoyed "Learning Java in 21 Days" but I'm sure there are other
good books as well

#5 - There will be times when you don't understand something, and get
frustrated. It is ok to ask questions here - but make sure they are
specific, quote exact problems (error messages, source code etc) that you
are having. This is not generally the NG for beginner questions, use
comp.lang.java.help Generally, if you take your time, and word your
question well - someone will answer you

#6 - Follow good posting practices. Google Groups' default reply does not
quote the previous message. Generally accepted technique is to quote the
message you are replying to and put your question/info/response below it.

Example

(e-mail address removed) said
Hello group!

Hello Jason!

#7 - Hang in there! It is not "hard" to learn a programming language, just
time consuming.
 
L

Luc The Perverse

Knute Johnson said:
I don't think Java is too complicated anybody over the age of about 12.
And a smart 10 year old ought to be able to learn simple programming with
Java.

Why don't you post some more information about what you are trying to do
and what you've tried so far. Unless your problem is getting it to
compile then post compilable code.

Let us know which OS and JDK version you are using.

You can always ask specific questions here or maybe preferably on
comp.lang.java.help. That is the place that beginners are being sent.

If you haven't looked at the Java Tutorial, you should. It is here:

http://java.sun.com/docs/books/tutorial/index.html

With tools like these kids can even make games!

http://www.goldenstudios.or.id/products/GTGE/
 
A

Andrew T.

...Or do you guys maybe disagree with my teacher and
think that I SHOULD learn input on my own?

I sure disagree. I think you would gain a lot from doing
the I/O trail of the Java Tutorial.
<http://java.sun.com/docs/books/tutorial/essential/io/>

OTOH, if you decide you wish to take a shortcut, checkout
the mindprod applet for generating I/O code.
<http://mindprod.com/applets/fileio.html>

HTH

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-general/200704/1
 
S

Sherm Pendley

Luc The Perverse said:
#7 - Hang in there! It is not "hard" to learn a programming language, just
time consuming.

As an addendum - it gets easier. Your first language is the hardest, because
you're not just learning the language, you're also learning how to program
in general.

sherm--
 
T

thelawrencebishop

I need a beginner's way to handle input and output. The teacher who
used to teach Java at my school (which was dropped by the school due
to the apocalyptic standardization of Michigan schooling) said that it
was way too advanced for me to learn at this point. And my main goal
right now is data conversions for a project.

So does anyone know of some code I can get online that's free to use
in whatever I want? Or do you guys maybe disagree with my teacher and
think that I SHOULD learn input on my own?

And in case you were wondering, yes, the teacher did have some
materials for me, but it hasn't worked uot too well, being dependent
on him.

You can learn I/O, but depending on what you want to do, it can become
a little involved, requiring a reasonable understanding of object-
oriented programming to understand what the code is doing.

I recommend,

SHORT TERM
* The SUN tutorial on I/O (http://java.sun.com/docs/books/tutorial/
essential/io/index.html)

LONG TERM
* Become familiar with the SUN tutorial site (http://java.sun.com/docs/
books/tutorial/).
* Visit a book store and spend some time looking through java books
that allege to teach newcomers. Any decent java book for newcomers
will cover I/O classes, interfaces, steams, how to open and close the
streams, flush them, etc. My experience is that books that are small
(the author isn't too wordy, and focuses on the vital things) tend to
be good references down the road when you need a refresher on how so-
and-so was done.
* Search the web:
http://mindprod.com/jgloss/jgloss.html has a lot of good stuff.
http://www.javacoffeebreak.com/tutorials/tutorials.html has a
newcomer's tutorial.

All the best,
Lawrence Bishop
 
H

Hakusa

Well to be more specific I want to take something the user writes and
parse it algebraically to simplify, not solve. And the teacher was
just saying that certain terms that I'm not familiar with like
tokenization and stuff like that would take a year to learn (although
that number did seem high, remember he was basing it off of a
classroom, not a determined self-teacher).

But my project really doesn't require input yet, it's just that I
recently got Java to work at all on my comp (I had a month of
uninstalling, reinstalling, deleting and bullshit because of something
I'm still confused about with Java.) so the same questions I was
dealing with before popped up and I thought I'd ask. I guess I'll just
ask with more specification when the time comes . . . or just use
Google.
 
T

thelawrencebishop

Well to be more specific I want to take something the user writes and
parse it algebraically to simplify, not solve. And the teacher was
just saying that certain terms that I'm not familiar with like
tokenization and stuff like that would take a year to learn (although
that number did seem high, remember he was basing it off of a
classroom, not a determined self-teacher).

It's good to heed the input of those who've gone before you. At times,
I've been in such a hurry that I've not been able to *hear* the input
of others. Some time later, once I've become more experienced and
knowledgeable about the subject at hand, I've realized, "So-and-so
told me that six months ago. Why didn't I take it to heart?"

The flip side of this is being too naïve (or idealistic) to know
something can't be done, then actually getting it done!

But my project really doesn't require input yet, it's just that I
recently got Java to work at all on my comp (I had a month of
uninstalling, reinstalling, deleting and bullshit because of something
I'm still confused about with Java.) so the same questions I was
dealing with before popped up and I thought I'd ask. I guess I'll just
ask with more specification when the time comes . . . or just use
Google.

For now (assuming you don't have a beginner's book), go to the
following URL and complete the tutorial,

http://www.javacoffeebreak.com/tutorials/gettingstarted/index.html

Then visit the SUN tutorial on I/O,

http://java.sun.com/docs/books/tutorial/essential/io/index.html

Then, you'll most likely need to learn about java.util.StringTokenizer
(and possibly java.lang.String.strip()) to parse your expressions.

All the best,
Lawrence Bishop
 

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

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top