-java- programming, not coffee
post-224133
Thread Starter
Post #1 of 16

kin3tix

500+ Head-Fier
Joined
Aug 27, 2002
Messages
644
Reaction score
0
Joined
Aug 27, 2002
Posts
644
Likes
0
does anyone know any good books/sites to learn java? my friend pointed me in some good directions, just wanted to get all the resources i can get. thanx.
 
     Share This Post       
post-224138
Post #2 of 16

elipsis

500+ Head-Fier
Joined
Apr 3, 2002
Messages
594
Reaction score
1
Joined
Apr 3, 2002
Posts
594
Likes
1
Straight from the source, baby:

http://developer.java.sun.com/developer/onlineTraining/

I do mostly PHP at work, there's little need for me to keep any sort of Java skills up to date, but it really is a cool language which I enjoy programming in when I (rarely) do it. Have fun.
 
     Share This Post       
post-224212
Post #3 of 16

penvzila

500+ Head-Fier
Joined
Jun 30, 2002
Messages
912
Reaction score
11
Joined
Jun 30, 2002
Posts
912
Likes
11
If you're new, bluej is a good ide.
You need to go to java.sun.com for the SDK. There's tyons of great books, I have the Java Bible, and my school textbook, of course.
 
     Share This Post       
post-224228
Post #4 of 16

andrzejpw

May one day invent Bose-cancelling headphones.
Joined
Jun 25, 2001
Messages
6,636
Reaction score
10
Joined
Jun 25, 2001
Posts
6,636
Likes
10
Just wondering: do you know C++? I've found that learning C++ first is, imho, a better way for getting into java. Also, let's be quite honest: java, ah, well, isn't used all that much.
 
     Share This Post       
post-224234
Post #5 of 16

elipsis

500+ Head-Fier
Joined
Apr 3, 2002
Messages
594
Reaction score
1
Joined
Apr 3, 2002
Posts
594
Likes
1
Quote:

Originally posted by andrzejpw
java, ah, well, isn't used all that much.


Um, yes it is. It is extremely popular in the business world for enterprise application development, which is what a huuuuuge proportion of developers do.

You are right, any c-syntax language is an excellent introduction to Java, but it's far from a waste to learn it.
 
     Share This Post       
post-224265
Post #6 of 16

andrzejpw

May one day invent Bose-cancelling headphones.
Joined
Jun 25, 2001
Messages
6,636
Reaction score
10
Joined
Jun 25, 2001
Posts
6,636
Likes
10
Sorry, I didn't mean to imply that java was useless to learn. Although it does have it's place it the enterprise world, to me, a "general" programmer, I find it a bit constricting.

Also, I find that learning C++, c, whatever, first, is a great way to get into java. Java does a lot of work for you.
 
     Share This Post       
post-224338
Post #7 of 16

Vertigo-1

Señor Sony
Joined
Jun 20, 2001
Messages
3,251
Reaction score
14
Location
Hawaii
Joined
Jun 20, 2001
Location
Hawaii
Posts
3,251
Likes
14
Actually, I wouldn't call Java necessarily easy to learn coming off your typical C++ curriculum. Some of the syntax will come to you more easily of course, but the hardest transition to make is going from a procedure oriented style of programming, which is what you learn for 2-3 years in C++ classes, to object oriented programming. I actually got into Java before I learned about classes in C++, and boy did it take me a while to adjust. The difference being in Java, you HAVE to use it, while in C++, it's optional. On the flip side, once I learned classes through Java, doing it through C++ became a breeze, and just became a matter of learning syntax and restrictions.

One of the craziest things about Java is all the different packages and components you can pull into your program. It's kind of hard to get around Java without some type of reference book lying around to look up what you need. I think if you are doing graphic based apps with an interface, Java has an advantage over C++. On the flip side, I think it's easier to do more mundane tasks using C++, such as sorting, searching, etc.

Every try Assembly? Now that's the shiznit.
011010110110...
 
     Share This Post       
post-224473
Post #8 of 16

taoster

Headphoneus Supremus
Joined
Dec 12, 2001
Messages
1,868
Reaction score
10
Joined
Dec 12, 2001
Posts
1,868
Likes
10
Quote:

Originally posted by Vertigo-1
but the hardest transition to make is going from a procedure oriented style of programming, which is what you learn for 2-3 years in C++ classes, to object oriented programming.


that's C not C++. you compiler might be the same but you werent programming in C++.
 
     Share This Post       
post-224491
Post #9 of 16

jatinder

100+ Head-Fier
Joined
Jun 28, 2001
Messages
366
Reaction score
11
Joined
Jun 28, 2001
Posts
366
Likes
11
Learning C++ (in an OO manner :wink: first is definitely the best way - although nowadays, with the prevalence of Java it could be argued that it may be more practical to go straight to Java.

Learning C++ first is better because you are forced to think about issues such as memory management, object copying and thread synchronization. If you get these things right in C++, then Java will be a breeze.

Java takes some of the pain away when dealing with those issues. This is only good *sometimes*. Also, in order to deal with those issues, major restrictions have to be placed on the language - again, this is only good *sometimes*.

There are also a number of philosophical differences between C++ and Java - which it is useful to be aware of.


Java at the end of the day, is easier to use than C++, partly because of its early adoption of a "standard library" and partly because all complex types are objects which all inherit from a common base class (Object).

Performance of Java is still an issue - which the Java community is making good progress with (JDK v1.4.1).

I started using C in about 1986, C++ in 1990, and playing with Java in1995. It wasn't until about 1998 that Java really became mainstream. Now I work mostly with Java.

It's probably best also, to take a look at the new support for generics and templates(?) that are coming up soon.

--Jatinder
 
     Share This Post       
post-224531
Post #10 of 16

andrzejpw

May one day invent Bose-cancelling headphones.
Joined
Jun 25, 2001
Messages
6,636
Reaction score
10
Joined
Jun 25, 2001
Posts
6,636
Likes
10
Personally, I learned to use classes early on in c++, and now they are an integral part of my programming. That's why transitioning to java would be easy. Personally, I wanted to start with java, and I sort of gave up. :-/ I then started taking c++ classes in high school, and I finally "got" it.

I haven't looked at java in a while though. Performance has always scared me a bit. Jatinder: How's the new jdk different? I may have to peruse it. . .
 
     Share This Post       
post-224548
Post #11 of 16

jatinder

100+ Head-Fier
Joined
Jun 28, 2001
Messages
366
Reaction score
11
Joined
Jun 28, 2001
Posts
366
Likes
11
The new JDK offers a better set of I/O primitives which support POSIX-like "select" or "poll" functionality. This means that you no longer require a dedicated thread per socket - which limits vertical scaleability. So with the new I/O primitives, vertical scaling is much better.

Most of the rest of the performance enhancements are transparent to you - mainly in the JVM and garbage collection algorithms. There are now a number of GC algorithms which can be selectively used in client and server apps.

All in all, much better.

There are a number of Java native compilers out there and the new JRockit JVM from BEA dynamically compiles up the entire app from the bytecode.

So raw Java performance really shouldn't be an issue nowadays. It's the GC and the "Java-philosophy" that slows things down now.

--Jatinder
 
     Share This Post       
post-224634
Post #12 of 16

mkyy

100+ Head-Fier
Joined
Feb 16, 2002
Messages
425
Reaction score
10
Joined
Feb 16, 2002
Posts
425
Likes
10
I'm not sure if my statement will be too bold, but I always thought C++ is a superset of Java. The transition (at least myself and a few of my friends) of going from C++ to Java is much easier than the other way.

As some had pointed out, performance of java is still and issue, especially with swing.

On the other hand, one of my professor said teaching software engineering in C++ is a pain in the butt.

Some advice from my fellow classmates for coding in Java, do not write something like import java.util.*, instead import the packages as needed. That'd help to improve the performace.
 
     Share This Post       
post-224677
Post #13 of 16

Wodgy

Headphoneus Supremus
Joined
Feb 24, 2002
Messages
4,657
Reaction score
12
Joined
Feb 24, 2002
Posts
4,657
Likes
12
People have been saying for years that the next generation of the JVM will solve the performance problems. While things continue to get better, anyone who has experience writing modern compilers knows that Java's performance problems will never totally be solved. The design choices made early in Java's design (notably "every function is a virtual function") make about 85% of modern compiler optimizations impossible. Sure you can do funky stuff at runtime at a large memory cost, but increased program footprint means less of the program fits in the processor cache. A cache miss costs about 200-300 cycles these days! And of course, all those dynamic techniques could be used for languages like C++ too.

That's not to say Java is bad. Far from it. It's probably the best enterprise software development environment there is.
 
     Share This Post       
post-224742
Post #14 of 16

andrzejpw

May one day invent Bose-cancelling headphones.
Joined
Jun 25, 2001
Messages
6,636
Reaction score
10
Joined
Jun 25, 2001
Posts
6,636
Likes
10
Basically, will java ever overcome that performance gap with c++? It's still interpreted at runtime, right?
 
     Share This Post       
post-224922
Post #15 of 16

elipsis

500+ Head-Fier
Joined
Apr 3, 2002
Messages
594
Reaction score
1
Joined
Apr 3, 2002
Posts
594
Likes
1
Java was never SUPPOSED to match C++ in terms of performance. The reason it's a popular enterprise application development language is that it's easy to do things fast in it without worrying about memory management and garbage collection.

Hardware is cheap. Programmers are expensive. That's why Java is so popular in the business world.
 
     Share This Post       

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top