Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2007

Tip: Looking for answers? Try searching our database.

input/output

Thread view: 
Hakusa@gmail.com - 04 Apr 2007 02:16 GMT
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.
Knute Johnson - 04 Apr 2007 03:13 GMT
> 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
[quoted text clipped - 9 lines]
> 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

Signature

Knute Johnson
email s/nospam/knute/

Luc The Perverse - 04 Apr 2007 04:48 GMT
>> 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
[quoted text clipped - 26 lines]
>
> 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/

--
LTP

:)
Chris Smith - 04 Apr 2007 03:46 GMT
> 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.

Signature

Chris Smith

Luc The Perverse - 04 Apr 2007 03:59 GMT
>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
[quoted text clipped - 9 lines]
> 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

Jason_Example@hello.com said

> Hello group!

Hello Jason!

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

--
LTP

:)
Sherm Pendley - 04 Apr 2007 12:23 GMT
> #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--

Signature

Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net

Andrew T. - 04 Apr 2007 05:09 GMT
..
>...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

Signature

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

thelawrencebishop@gmail.com - 06 Apr 2007 19:41 GMT
On Apr 3, 8:16 pm, "Hak...@gmail.com" <Hak...@gmail.com> wrote:
> 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
[quoted text clipped - 9 lines]
> 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
Hakusa@gmail.com - 06 Apr 2007 20:00 GMT
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.
thelawrencebishop@gmail.com - 07 Apr 2007 15:42 GMT
On Apr 6, 2:00 pm, "Hak...@gmail.com" <Hak...@gmail.com> wrote:
> 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
[quoted text clipped - 3 lines]
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.