Learning Java

T

Tuvas

Hey all,

I have been a C programmer for a number of years, and am needing to
learn Java. I would like to get a book about it, but I am hesistant to
just buy a beginners guide to Java, fearing that my knowledge of C will
cause me to not pay much attention to it. I would like to get a book on
programming in Java for those who know C, or something along those
lines. Can anyone recommend a book for me? Thanks!
 
J

Joe

http://www.computer-books.us/

Just found this on digg.com. There's a couple of Java books for
download there.

As for the switch from C to Java, you mainly need to wrap around the
Object-Oriented idea. C++ covers this in great detail (I went pretty
seamlessly from C++ to Java, just because SO many of the principles are
the same). I don't think they really make a book specifically for Java
for C programmers, but most should be able to give you the OOP
introduction, and from there you should start to pick it up pretty
well.

Also, another great tool is the Java API.
http://java.sun.com/j2se/1.3/docs/api/. I know, it's a lot to digest
now, but once you start getting into the language, that will explain
EVERYTHING you'd need to know about certain objects.

Happy hunting!
 
R

Rhino

Tuvas said:
Hey all,

I have been a C programmer for a number of years, and am needing to
learn Java. I would like to get a book about it, but I am hesistant to
just buy a beginners guide to Java, fearing that my knowledge of C will
cause me to not pay much attention to it. I would like to get a book on
programming in Java for those who know C, or something along those
lines. Can anyone recommend a book for me? Thanks!
I can't recommend a book on Java for C programmers but I'm pretty sure there
are some. I'm sure I've seen this question asked and answered on this
newsgroup before. Try doing a Google Groups search of
comp.lang.java.programmer and search for 'C' and 'Java' (and maybe 'learn')
and you should find several recommendations.
 
A

abuggia

I'd recommend Hardcore Java (O'Reilly). I could not get through
Learning Java because I knew how to program and it was too slow.
Hardcore Java teaches you advanced techniques and concepts and I was
able to pick up on syntax along the way.
 
P

Patricia Shanahan

Tuvas said:
Hey all,

I have been a C programmer for a number of years, and am needing to
learn Java. I would like to get a book about it, but I am hesistant to
just buy a beginners guide to Java, fearing that my knowledge of C will
cause me to not pay much attention to it. I would like to get a book on
programming in Java for those who know C, or something along those
lines. Can anyone recommend a book for me? Thanks!

I've tried both conversion books and beginner books for learning new
languages, and I find beginner books MUCH more effective.

It's a matter of mental mindset. Every language corresponds to a model
of how programs work. Someone who is comfortable with a language's model
is much more likely to produce smooth, effective code in that language
than someone who is thinking in the model from a different language.

The more I make myself ignore all the other languages I know, and focus
on the language I'm learning, the better I do at getting my brain
wrapped around the right model.

The "programming in X for those who know Y" books tend to keep me
thinking in language Y's model, rather than getting me into language X's
model.

This is perhaps most important of all for the C to Java transition. A
lot of Java syntax looks superficially like C, but the model of what is
going on underneath is profoundly different.

Patricia
 
T

Tuvas

I should probably mention I've had a taste of object-oriented
programming, with Python. I'll look into the Hardcore Java for sure.
Thanks for all of your help!
 
R

Roedy Green

I have been a C programmer for a number of years, and am needing to
learn Java. I would like to get a book about it, but I am hesistant to
just buy a beginners guide to Java, fearing that my knowledge of C will
cause me to not pay much attention to it. I would like to get a book on
programming in Java for those who know C, or something along those
lines. Can anyone recommend a book for me? Thanks!

see http://mindprod.com/jgloss/cpp.html
for some recommendations.

I learned C++ first. I got in SO much trouble imagining that Java
worked the same as C++ just because the syntax looked familiar.
 
R

Roedy Green

This is perhaps most important of all for the C to Java transition. A
lot of Java syntax looks superficially like C, but the model of what is
going on underneath is profoundly different.

It is almost to the point I think knowing C++ first made learning Java
slower. There are so many superficial resemblances. Also I tend to
think in terms of machine language. I like to understand just what is
going on under the hood. Java is a quite abstract language and
deliberately tries to fog that over and provides no low level tools to
peek., e.g. just what does an object look like in RAM.
 
A

Alex Hunsley

Tuvas said:
Hey all,

I have been a C programmer for a number of years, and am needing to
learn Java. I would like to get a book about it, but I am hesistant to
just buy a beginners guide to Java, fearing that my knowledge of C will
cause me to not pay much attention to it. I would like to get a book on
programming in Java for those who know C, or something along those
lines. Can anyone recommend a book for me? Thanks!

Such "C to Java" (or similar) guides can be pretty useful. But an
important step, as others have pointed out, is getting sufficiently used
to a new language such that you're not thinking of it in terms of
another more familiar language you already know. Getting to know a new
language in direct, first principle terms is pretty essential if you're
going to do any significant amount of work on it. As an example of what
may otherwise happen: you sometimes see programmers going out of their
way to make a new language look like, and behave like, a language that
is more familiar to them. Bully for them, perhaps, but as soon as other
developers come along, more proficient in the language in question, they
will look at the Frankenstein code and see a confusing mess.
 
M

Missaka Wijekoon

Tuvas said:
Hey all,

I have been a C programmer for a number of years, and am needing to
learn Java. I would like to get a book about it, but I am hesistant to
just buy a beginners guide to Java, fearing that my knowledge of C will
cause me to not pay much attention to it. I would like to get a book on
programming in Java for those who know C, or something along those
lines. Can anyone recommend a book for me? Thanks!
I would recommend attempting to do a small project in Java. Like you, I
started with C. It was easy to pick up Java's syntax and grammer, but
the elegance was only realized as I started extending objects, creating
and using interfaces, abstract classes, exceptions, etc. I noticed that
Java allows me to spend more time in design whereas C requires more time
coding (leaving less time for design.) In the beginning, inevitably,
you will write some Java code in C-style. But as you get to know the
language you will go back and realize what you could have done better.
Dive in! I found that C made me better Java coder and that Java made me
a better C coder.

Good luck!
 
T

Tuvas

It sounds like learning a new computer language is just like learning a
real language, you start out with the other languages you already know,
but eventually need to become fluent in itself. Thanks for all of the
tips!
 
T

Thomas G. Marshall

Joe said something like:
http://www.computer-books.us/

Just found this on digg.com. There's a couple of Java books for
download there.

As for the switch from C to Java, you mainly need to wrap around the
Object-Oriented idea. C++ covers this in great detail (I went pretty
seamlessly from C++ to Java, just because SO many of the principles are
the same).

.... *no one* goes seamlessly from anything to C++ nor from C++ to
anything.... ;)
 
R

Roedy Green

you sometimes see programmers going out of their
way to make a new language look like, and behave like, a language that
is more familiar to them.

One of the keys to writing Java is to be familiar with what is in the
enormous class libraries. You rarely write your own algorithm style
code. In C you usually presume you are going to gave to roll
everything on your own.
 
W

weironghai

haha you can find a book named c++and java.that ont only have java &c++
bu also c.best wishes for you to learn java .i 'm a tyro too
 
T

Thomas G. Marshall

Bjorn Abelli said something like:
...

But the "transition" from one language to another can be more or less
easy.

I have experienced C++-programmers that had difficulties in grasping Java,
and C++-programmers who got to it quickly.

Many "C++-programmers" made their way into C++ from C, not realizing the
strengths of OO-programming, using it more or less only as an "enhanced
C".

Other C++-programmers have started from the perspective of learning
OO-programming, using C++ during learning the OO-concepts, as the language
to implement their newfound knowledge.

The latter group had obviously an easier path to Java, than the former.

// Bjorn A


Oh of course; I was clearly being glib.

Your point about C++ programmers using C++ as an uber-C is a very good one,
but there is a larger generalization to make here. However, observations on
the shortcomings of C++ have been made so many times that if printed out the
paper would no doubt collapse upon itself and form a star, in a very
Adamsarian way.

;) And that part was not being glib.
 
T

Thomas G. Marshall

(e-mail address removed) said something like:
haha you can find a book named c++and java.that ont only have java &c++
bu also c.best wishes for you to learn java .i 'm a tyro too


If English is not your native language forgive me, but otherwise, I have no
@#$%ing idea what you just said.
 
P

petermichaux

A quick find didn't show the mention of "head" in this thread so...

Head First Java : Your Brain on Java - A Learner's Guide

This book is great. Read the reviews on amazon. People like this. So
did I. It makes Java jargon make sense quickly.

Peter
 
P

petermichaux

A quick find didn't show the mention of "head" in this thread so...

Head First Java : Your Brain on Java - A Learner's Guide

This book is great. Read the reviews on amazon. People like this. So
did I. It makes Java jargon make sense quickly.

Peter
 
B

Bjorn Abelli

Joe said something like:

... *no one* goes seamlessly from anything to C++ nor from C++ to
anything.... ;)

But the "transition" from one language to another can be more or less easy.

I have experienced C++-programmers that had difficulties in grasping Java,
and C++-programmers who got to it quickly.

Many "C++-programmers" made their way into C++ from C, not realizing the
strengths of OO-programming, using it more or less only as an "enhanced C".

Other C++-programmers have started from the perspective of learning
OO-programming, using C++ during learning the OO-concepts, as the language
to implement their newfound knowledge.

The latter group had obviously an easier path to Java, than the former.

// Bjorn A
 
R

Roger Dodger

I liked Core Java 1:Fundamentals and Core Java 2: Advanced Features
by Cay Horstmann. Covers a wide variety of features and functionality
of the language, and has sidebar icons to draw attention to how the
language differs from C/C++.
 

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,776
Messages
2,569,603
Members
45,200
Latest member
LaraHunley

Latest Threads

Top