Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Learning Java

Reply
Thread Tools

Learning Java

 
 
Steve Graham
Guest
Posts: n/a
 
      04-17-2012
I've been a programmer for 3 decades working in mostly procedural
languages, although I have done some work with a couple of
object-oriented ones.

Which book would you recommend that I read to learn Java? Obviously, I
don't want to read a beginning programming book, nor do I want to study
one which presupposes I know something about Java or a lot about OO
concepts.

Thanks, Steve
 
Reply With Quote
 
 
 
 
markspace
Guest
Posts: n/a
 
      04-17-2012
On 4/17/2012 2:03 PM, Steve Graham wrote:
> I've been a programmer for 3 decades working in mostly procedural
> languages, although I have done some work with a couple of
> object-oriented ones.
>
> Which book would you recommend that I read to learn Java? Obviously, I
> don't want to read a beginning programming book, nor do I want to study
> one which presupposes I know something about Java or a lot about OO
> concepts.



First, how is your object oriented programming skills? Java really only
provides OO options, so you're going to need to know OO decently.

To get started with Java itself, I recommend you start with the Oracle
tutorial. It's free and does a decent job.

<http://docs.oracle.com/javase/tutorial/>

Second, there are quite a few books. I like O'Reilly's Learning Java.
It starts as a basic introduction, but there's enough other information
in the book that will last you quite a while as a reference. It also
has one of the better explanations of Java's generics; that alone is
worth the price of the book imo.

There's also Effective Java, by Joshua Bloch. And Java Concurrency in
Practice by Brian Goetz for a well rounded treatment of multi-threading
in Java (very important these days).

I also took a programming course via javapassion.com. It's a pay-for
site now. But the course I took would have been well worth the price
they are asking now. If you're a busy professional who wants to come up
to speed more quickly, I recommend it as faster than trying to self-teach.

Beyond that... well my library is one whole bookcase of software
engineering best practice and methodologies, Java and otherwise. I have
several boxes in storage of books I didn't care for. It's a broad
field, and important to keep up with constantly.




 
Reply With Quote
 
 
 
 
glen herrmannsfeldt
Guest
Posts: n/a
 
      04-17-2012
markspace <-@.> wrote:
> On 4/17/2012 2:03 PM, Steve Graham wrote:
>> I've been a programmer for 3 decades working in mostly procedural
>> languages, although I have done some work with a couple of
>> object-oriented ones.


>> Which book would you recommend that I read to learn Java? Obviously, I
>> don't want to read a beginning programming book, nor do I want to study
>> one which presupposes I know something about Java or a lot about OO
>> concepts.


You can do procedural programming in Java. You might find it easier
to start that way, to get used to Java, and then learn the OO stuff.

Read about static methods in any Java book, and you can pretty
easily write anything that you would in C. (It will even look
a lot like C.)

Java is much like C (to me, it is closer to C than C++ is).
If your 3 decades are in C, you should have an easy time learning
procedural Java.

Also, you can do OO programming in a procedural language, though
it isn't quite as easy. I knew OO programs in Fortran 66 (more than
three decades ago).

> First, how is your object oriented programming skills?
> Java really only provides OO options, so you're going to
> need to know OO decently.


> To get started with Java itself, I recommend you start with
> the Oracle tutorial. It's free and does a decent job.


> <http://docs.oracle.com/javase/tutorial/>


> Second, there are quite a few books. I like O'Reilly's Learning Java.
> It starts as a basic introduction, but there's enough other information
> in the book that will last you quite a while as a reference. It also
> has one of the better explanations of Java's generics; that alone is
> worth the price of the book imo.


He can skip the chapters that are too easy, but should study
the OO parts, even if they are introductory.

(snip of more book discussion)

-- glen
 
Reply With Quote
 
Arne Vajh°j
Guest
Posts: n/a
 
      04-17-2012
On 4/17/2012 5:50 PM, glen herrmannsfeldt wrote:
> markspace<-@.> wrote:
>> On 4/17/2012 2:03 PM, Steve Graham wrote:
>>> I've been a programmer for 3 decades working in mostly procedural
>>> languages, although I have done some work with a couple of
>>> object-oriented ones.

>
>>> Which book would you recommend that I read to learn Java? Obviously, I
>>> don't want to read a beginning programming book, nor do I want to study
>>> one which presupposes I know something about Java or a lot about OO
>>> concepts.

>
> You can do procedural programming in Java. You might find it easier
> to start that way, to get used to Java, and then learn the OO stuff.
>
> Read about static methods in any Java book, and you can pretty
> easily write anything that you would in C. (It will even look
> a lot like C.)
>
> Java is much like C (to me, it is closer to C than C++ is).
> If your 3 decades are in C, you should have an easy time learning
> procedural Java.


He could.

But I would not recommend it.

If one is to learn Java, then one should use Java the Java way.

It will not utilize the language fully and it would puzzle all
maintenance programmer to use Java the C way.

Arne


 
Reply With Quote
 
Arne Vajh°j
Guest
Posts: n/a
 
      04-17-2012
On 4/17/2012 5:03 PM, Steve Graham wrote:
> I've been a programmer for 3 decades working in mostly procedural
> languages, although I have done some work with a couple of
> object-oriented ones.
>
> Which book would you recommend that I read to learn Java? Obviously, I
> don't want to read a beginning programming book, nor do I want to study
> one which presupposes I know something about Java or a lot about OO
> concepts.


I think you need a book like this one:

http://www.wrox.com/WileyCDA/WroxTit...471777102.html

Note that I do not know the specific book, but other of
Wrox'es "Professional Xxxxx" are good.

Arne
 
Reply With Quote
 
markspace
Guest
Posts: n/a
 
      04-17-2012
On 4/17/2012 2:50 PM, glen herrmannsfeldt wrote:

> You can do procedural programming in Java. You might find it easier
> to start that way, to get used to Java, and then learn the OO stuff.



I have to concur with Arne and wouldn't recommend that either. I asked
how his OO comfort level was for a reason. If it's nil, he should also
study OO along with Java. If it's average to fair, he'll probably be fine.

Some specifics from the OP about what level of OOP he is comfortable
with would help us with further recommendations. (What books has he
read, what has he done, etc.)


 
Reply With Quote
 
Arved Sandstrom
Guest
Posts: n/a
 
      04-18-2012
On 12-04-17 06:50 PM, glen herrmannsfeldt wrote:
> markspace <-@.> wrote:
>> On 4/17/2012 2:03 PM, Steve Graham wrote:
>>> I've been a programmer for 3 decades working in mostly procedural
>>> languages, although I have done some work with a couple of
>>> object-oriented ones.

>
>>> Which book would you recommend that I read to learn Java? Obviously, I
>>> don't want to read a beginning programming book, nor do I want to study
>>> one which presupposes I know something about Java or a lot about OO
>>> concepts.

>
> You can do procedural programming in Java. You might find it easier
> to start that way, to get used to Java, and then learn the OO stuff.


I suspect that a cold, hard analysis of all Java code written in the
past 15 years would show that the large majority of it _is_ procedural.

Fact is, Java and Objective-C and C++, to name a few OOP languages, are
generally used to write substantially imperative code, where procedures
appear as object methods. We may as well not ignore that, it's what most
OO programmers do.

Having said that, the advantage of objects and OOP shouldn't be
discounted. We simply shouldn't pretend that modern OOP isn't still
largely imperative/procedural code. If we advise the OP to learn proper
OO - and I certainly do - the fact is that in his studies he's going to
come across a stupendous amount of imperative Java. I recommend that the
OP keep this in mind. There are fine resources available for learning
the principles and theory of OOP; one simply has to remember that much
real-world code deviates substantially.
[ SNIP ]

AHS
--
A fly was very close to being called a "land," cause that's what they do
half the time.
-- Mitch Hedberg
 
Reply With Quote
 
Arne Vajh°j
Guest
Posts: n/a
 
      04-18-2012
On 4/17/2012 8:07 PM, Arved Sandstrom wrote:
> On 12-04-17 06:50 PM, glen herrmannsfeldt wrote:
>> markspace<-@.> wrote:
>>> On 4/17/2012 2:03 PM, Steve Graham wrote:
>>>> I've been a programmer for 3 decades working in mostly procedural
>>>> languages, although I have done some work with a couple of
>>>> object-oriented ones.

>>
>>>> Which book would you recommend that I read to learn Java? Obviously, I
>>>> don't want to read a beginning programming book, nor do I want to study
>>>> one which presupposes I know something about Java or a lot about OO
>>>> concepts.

>>
>> You can do procedural programming in Java. You might find it easier
>> to start that way, to get used to Java, and then learn the OO stuff.

>
> I suspect that a cold, hard analysis of all Java code written in the
> past 15 years would show that the large majority of it _is_ procedural.
>
> Fact is, Java and Objective-C and C++, to name a few OOP languages, are
> generally used to write substantially imperative code, where procedures
> appear as object methods. We may as well not ignore that, it's what most
> OO programmers do.
>
> Having said that, the advantage of objects and OOP shouldn't be
> discounted. We simply shouldn't pretend that modern OOP isn't still
> largely imperative/procedural code. If we advise the OP to learn proper
> OO - and I certainly do - the fact is that in his studies he's going to
> come across a stupendous amount of imperative Java. I recommend that the
> OP keep this in mind. There are fine resources available for learning
> the principles and theory of OOP; one simply has to remember that much
> real-world code deviates substantially.


OOP is supposed to be imperative, so I do not see much point in that
argument.

How big a portion of Java code that is procedural will depend a
bit on where you put the bar.

If we put the bar relative low:
procedural = all static methods
OOP = use of interfaces, private fields public methods
then the majority of Java code is not procedural.

Arne

 
Reply With Quote
 
glen herrmannsfeldt
Guest
Posts: n/a
 
      04-18-2012
markspace <-@.> wrote:

(snip, I wrote)
>> You can do procedural programming in Java. You might find it easier
>> to start that way, to get used to Java, and then learn the OO stuff.


> I have to concur with Arne and wouldn't recommend that either. I asked
> how his OO comfort level was for a reason. If it's nil, he should also
> study OO along with Java. If it's average to fair, he'll probably be fine.


I think it depends. OP didn't say which language(s) were used over
those decades. It might make a difference. Also, it might just be
too discouraging. Starting out procedural, one can use the ideas
one knows while learning the Java specific parts.

> Some specifics from the OP about what level of OOP he is comfortable
> with would help us with further recommendations. (What books has he
> read, what has he done, etc.)


I suppose, but maybe also why he wants to learn Java.

-- glen
 
Reply With Quote
 
Stefan Ram
Guest
Posts: n/a
 
      04-18-2012
glen herrmannsfeldt <(E-Mail Removed)> writes:
>Java is much like C


Here is an example C code (an untested library)
to be translated to Java:

#include <stdio.h>

int open
( const char * const path,
const char * const mode,
double( *continuation )( FILE *, void * ),
double( *error )( int, int ),
void * data )
{ FILE * const file = fopen( path, mode );
int result = 0; int status;
if( !file )result |= 1; else
{ if( status = continuation( file, data ))result |= 2;
if( fclose( file ))result |= 4; }
if( result )
{ if( error( result, status ))result |= 8; }
return result; }

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[I'm learning C]: Learning to use ucontext Andrey Popp C Programming 5 01-31-2012 01:05 AM
Begin Learning Java ! - Most simple java tutorial - ( Begin Learning Java Java 5 03-17-2010 11:41 PM
Java tips & tutorials - best resources for learning Java Hayak Java 1 04-17-2007 12:25 AM
Learning C and Learning Make/Configure/Building/Linking Hal Vaughan C Programming 7 03-21-2006 05:07 PM
e-learning, (collaborative learning environment) collinm Java 1 09-08-2005 09:52 PM



Advertisments