Java, Where To Start? 558
I'm a web developer who has design and programming experience. So, VB, ASP, PHP, Coldfusion, Perl, even C and C++ I have in my belt. I also use Dreamweaver and/or do a lot of my HTML/XHTML/JavaScript coding by hand. So, the DOM, DHTML, etc, all good to me and even OOP thinking and design I have when I code. And I even have MySQL and other databases, again, not an issue here. So, my weak point is — Java — I see so many jobs out there with J2EE, Hibernate, Eclipse, Netbeans. Beside the obvious, which is to learn Java the core language, I don't know where else to go from there. There is so much! What should I read? in what order? What software do I require? UML? Swing? I mean, what is the curriculum required for someone to say they are a solid Java developer? Even assuming I have to go through Java itself, what are the good books out there?
Wrox Press (Score:5, Informative)
I started Visual C++ 5 with a book called "Beginning Visual C++ 5" by Ivor Horton from Wrox Press. When I started in Java I bought a book titled "Beginning Java" by Ivor Horton.
I would start there. Java is really straight forward OO language. The only issue you will have coming from C++ is to let go of destructors and realize Java does not use them. Many from C++ take about 6 months to stop tryng to make a finalizer into a destructor.
Re: (Score:3, Interesting)
Does Java uses finalizers? If so, how do they differ from C++ destructors?
(Honest question - I'm not a Java guy but IIRC I found the finalizer concept in Java useful in understanding finalization (called during GC) in Spidermonkey.)
Re:Wrox Press (Score:5, Informative)
Does Java uses finalizers? If so, how do they differ from C++ destructors?
Yes, it does. They differ from C++ destructors as they are not called explicitly(or implicitly when variables get out of scope, as in C++). Rather, finalizers are called when an object is garbage collected.
The usual advice is not to use finalizers, except to make sure that underlying native resources are released(ie. file handles, sockets, etc.). Even then, there should be a mechanism to release those resources without relying on the finalizer being called, such as a close() method or an equivalent. The finalizer is only guaranteed to be called when the object is GC'ed, which may happen much later than expected if there is not a lot of pressure on the memory system or if there is still a reference to the object.
There is no guarantees that finalizers will ever be called for an object, as the VM can be forcibly interrupted via Runtime.halt() and finalization of all objects on VM shutdown can be disabled.
Re:Wrox Press (Score:4, Informative)
In a garbage-collected environment you typically don't provide the allocator or destructor. Similarly, you don't need your finaliser to handle destruction of instance variables, since the garbage collector will do this for you. The only thing you need a finaliser to do is release any resources that are not managed by the garbage collector. This includes locks, I/O handles, and so on. In Java these are typically wrapped in an object of some kind, so you don't need to explicitly release them either, since the object encapsulating them does this. You would use a finaliser in a class which used the native code interface to acquire resources from the operating system or some other source outside the JVM. Without doing this, you would leak.
Re:Wrox Press (Score:4, Insightful)
Re: (Score:3, Informative)
There's a useful trick with finalizers:
public class Something implements Closeable
{
public Throwable stack;
public Something()
{
try
{
throw new IllegalStateException();
} catch(Throwable t) {stack=t};
}
public void close()
{
Re: (Score:3, Interesting)
I would avoid Wrox on general principles. This was hammered home to me when I was offered a contract to write a single chapter for a Wrox book. Apparently they go out and find people who will work *extremely* cheap. I mean, the pay was in the three digits -- I turned them down, needless to say. And as near as I could tell, they didn't do much vetting of my expertise. They just take all these chapters and throw them together into a book. You're just not going to get a cohesive publication that way.
They put a
Re: (Score:3, Insightful)
I've had the misfortune of purchasing a few Worx titles, and they are indeed incoherent, gigantic and largely useless. I've generally had good experiences with O'Reilly books, however.
But the most useful has really just been google. Finding interesting examples and work through stuff, as most books on modern Web technology tends to be rather out of date by the time it hits the bookstore.
Just a thought.... (Score:4, Insightful)
Isn't it better to specialise in a few of the varied languages and systems you have worked on, rather than trying to spread yourself thin?
There is truth in the saying 'jack of all trades - master of none'.
So, maybe concentrate on building up the other skills, rather than trying to 'bag' a new technology. I used to try to gain exposure to loads of different technologies but found that when you do so you do at the expense of the 'depth' of knowledge you have in any one.
Re: (Score:2)
For programming, that reasoning is bullshit. The more code you see and write, the more programming paradigms and syntaxes you have seen and used, the better programmer you will be.
Re:Just a thought.... (Score:5, Insightful)
After nearly 20 years of programming experience, I have come to the conclusion that programming languages are totally irrelevant when it comes to "being a master". The real art lies in being able to analyze the problem, and making abstractions to come up with an elegant solution. The rest is implementation, and wether you write it in C++, Java or bash, it all remains more or less the same.
You can know every little detail of C++ e.g., and still be a lousy programmer. There is a phase in most programmers life (mine too) where they think "Cool, C++ has multiple inheritance, so I'm going to use that if I can". But after a while you'll learn to say "I'm going to use that if I really have to".
So, please, go ahead and learn new languages if you want, it won't do any harm, but you'll only advance as a programmer by constantly questioning your own designs and thinking about how they can be improved.
Re: (Score:3, Insightful)
After nearly 20 years of programming experience, I have come to the conclusion that programming languages are totally irrelevant when it comes to "being a master". The real art lies in being able to analyze the problem, and making abstractions to come up with an elegant solution.
The problem with that theory is that different programming languages favour different kinds of abstractions. A programmer only familiar with Java will only be familiar with the abstractions that work well in the Java environment. Compared to some other languages, Java is pretty limited in what abstractions can be practically implemented, so it greatly restricts the amount of solutions available to the programmer.
What does Java lack now? (Score:3, Insightful)
Compared to some other languages, Java is pretty limited in what abstractions can be practically implemented,
Like what? Name anything and Java probably already has a library for it. Java is just as flexible as anything these days, and wether your thing in running Ruby on Rails on top of the VM with some Java through in the backend or some functional Groovy work Java has options.
That's a big advantage it has going for it, so many people have used it now there are a lot of resources and options for wherever
Re: (Score:3, Interesting)
Like what? Name anything and Java probably already has a library for it. Java is just as flexible as anything these days, and wether your thing in running Ruby on Rails on top of the VM with some Java through in the backend or some functional Groovy work Java has options.
I think you misunderstand me. I'm not criticizing Java's libraries or the JVM. I'm criticizing the Java language.
As for how its limited, just consider the tools used in other languages. Lisp programmers often use macros in their code, because manipulating Lisp code is extremely easy. Java programmers have libraries for generating bytecode on the fly, but they have nowhere near the ease at which S-expressions can be thrown around. As such, libraries or frameworks written in Java that use bytecode generation
Re:What does Java lack now? (Score:4, Interesting)
Java programmers have libraries for generating bytecode on the fly, but they have nowhere near the ease at which S-expressions can be thrown around.
Java is soon adding closures though. Honestly I used to do a lot of Lisp and Scheme and I always though I could represent pretty well want I wanted to do in Java, coming from those as a base - there are just different mechanics to achieve a similar design.
You have me on monads, though even there there are possibilities [tmorris.net], and they are not that difficult (and in fact I have made heavy use in some code of exactly the technique mentioned for one project).
My criticism, therefore, lies with more with programmers who don't look beyond the language of Java,
While I agree with that at some level, I would say there are too many people that have not explored the full range of what Java itself can do and how techniques learned in different languages can be applied using a combination of Java and various libraries.
Re:Just a thought.... (Score:5, Insightful)
After nearly 20 years of programming experience, I have come to the conclusion that programming languages are totally irrelevant when it comes to "being a master". The real art lies in being able to analyze the problem, and making abstractions to come up with an elegant solution. The rest is implementation, and wether you write it in C++, Java or bash, it all remains more or less the same.
Agreed. However, 'being a master' programmer and then picking up a new language is still going to leave you making noob mistakes with it. Additionally, some languages are enough of a paradigm shift (C++ to Lisp, for example) that the elegant abstractions you might make for C++ is like ramming a square peg into a round hole if you apply it to Lisp.
To put it another way, when you are a master with a hammer, every problem becomes one of how to bang a nail... if someone hands you a pair of pliers... you might find yourself using it expertly to hammer something.
You can know every little detail of C++ e.g., and still be a lousy programmer.
Agreed 100%. But not knowing the language you are using isn't a recipe for success either. ;)
There is a phase in most programmers life (mine too) where they think "Cool, C++ has multiple inheritance, so I'm going to use that if I can". But after a while you'll learn to say "I'm going to use that if I really have to".
20 years experience you said. You should hit the point of saying, "I'm just not going to use multiple inheritance. Period." soon. I kid, I kid.
So, please, go ahead and learn new languages if you want, it won't do any harm, but you'll only advance as a programmer by constantly questioning your own designs and thinking about how they can be improved.
Exposing yourself to more languages is helpful for multiple reasons. It helps you learn to separate the programming problem from the language. Its much easier to think in abstract terms if you have multiple languages in your belt. And of course, having more tools in your belt means that when you approach a new problem you can reach for the best one.
Re:Just a thought.... (Score:4, Insightful)
The problem as I see it (I'm in the same situation as the poster - I have experience in almost all languages / DBs / etc. he has, except Java) is that he has experience in areas that are saturated and / or in a decline trend, and none in an area with a growing demand.
So I think it's not really a matter of being a "jack of all trades", as you put it, but keeping up with the market demands. I actually wouldn't like to learn Java right now, as I think I can do pretty well with my current experience. I'm more interested in learning other newer languages / technologies that seem more interesting and more promising than Java (even if sometimes not as mature or proven), like Ruby, Python, etc... Unfortunately, none of these has nearly as much demand as does Java, so I'm more compelled to learn it to keep myself hireable.
Btw, it's not that I think Java is a worse language than the ones I'm more interested in, it's just that I think that learning Java wouldn't be as fun or rewarding than the alternatives. But I'm more than willing to be convinced that I'm wrong, so I'll watch this discussion closely for tips.
Thinking in Java (Score:5, Informative)
Thinking in Java is nice. And it's free. http://www.mindview.net/Books/TIJ/ [mindview.net]
Re: (Score:3, Interesting)
Yup, I agree 100%.
I started reading this book from the internet in 1999 when I started my career in programing Java. It was a great place to start, there might be better material out now but that's what gave me my jump start.
Thinking in Java (Score:5, Informative)
Thinking in Java is a good book on the Java language. You can read it online at the author's web site: http://www.mindview.net/Books/TIJ/ [mindview.net]
Re: (Score:3, Insightful)
I second that recommendation.
However, I'd suggest you go pretty light on actually reading the books. Just get in there and build something.
Sure, you can use the books as references. I'd get O'Reilly's "Java in a Nutshell" reference, and also one or two of their Java cookbooks, so you can look at some reasonably clean example code.
But you should mainly pick a number of small projects and build them. Java is a mature platform with a lot of history and extensions for all sorts of circumstances. That can be int
If you know C++ ... (Score:2, Insightful)
... then learning Java, EJB, etc. ... it should be a walk in the park. You shouldn't even need a book. Just go get the specifications from the Sun site and read them.
Seriously, Java is orders of magnitude more simple than C++. (That's a pro and a con.)
Re: (Score:3, Insightful)
where to start (Score:2, Funny)
public static void main () {
Fail (Score:5, Informative)
You need to encapsulate that in a class. And your main method signature is wrong -- needs to take a String array as an argument, or else the program will say "No such method found (main)" and die.
Honestly, its almost like no one on Slashdot programs in Java some days... ;)
Re:where to start (Score:4, Funny)
Try javabat.com (Score:5, Informative)
For basic coding practice, try the free http://javabat.com/ [javabat.com] -- it has little coding problems (logic, strings, arrays, recursion) that run right in the browser, so you get immediate feedback. It's great for building skill in the basics, but it's no substitute for building larger programs. Disclaimer: I built it
Re: (Score:2, Informative)
sun certified developer. (Score:4, Informative)
Sun has developed a program to train for java.
read at the sun site [sun.com]
java is relative simple. Those certification programs give you a guideline what is involved in certain roles. But java is MUCH and lots of simple libraries. that is what people underestimate.
I understand you might not need certification, but the knowledge described there gives a good idea what you need/can put on your CV.
Head first (Score:4, Informative)
My first Java book was: head first. http://oreilly.com/catalog/9780596004651/ [oreilly.com]
This great if you have little experience with an object oriented language. They state that they are funny...Well sometimes they are :-).
Another way to learn java is to code a little Java mobile App. This is fun, the API is quite limited usually and so you don't need hours of documentation before seeing something nice.
The blackberry IDE was free and really nice to use back in my early days. You get the basic before heading to more serious things.
Job or knowledge? (Score:2, Insightful)
If you want a Java job, just update your resume to say that you know Java. I have met lots of J2EE experts at work, who would not be able to code a "Hello World" program, if their jobs depended on it. Also learn lots of buzz words.
If you want to learn Java for knowledge, join a community college, install Eclipse and get started.
You are Paula! (Score:5, Funny)
And you are brillant!
http://thedailywtf.com/Articles/The_Brillant_Paula_Bean.aspx [thedailywtf.com]
Re: (Score:3, Insightful)
Only problem with this strategy is that the only companies that will employ you are full of numptys that don't know what they are doing.
These places are usually god damn awful places to work.
Re: (Score:3, Interesting)
I have met lots of J2EE experts at work, who would not be able to code a "Hello World" program,
Just for those who think he's kidding:
Having people do "Hello World" on the whiteboard is one of my standard interview questions. I'm pretty good at weeding out the enterprise 'tards by resume alone, but I'm still surprised how many people are unable to write a working "Hello World" program from scratch. Maybe a third of my first-round interviewees fail this.
Re:Job or knowledge? (Score:5, Funny)
Hello World? That's easy!
public interface MessageStrategy {
public void sendMessage();
}
public abstract class AbstractStrategyFactory {
public abstract MessageStrategy createStrategy(MessageBody mb);
}
public class MessageBody {
Object payload;
public Object getPayload() {
return payload;
}
public void setPayload(Object payload) {
this.payload = payload;
}
public void send(MessageStrategy ms) {
ms.sendMessage();
}
}
public class DefaultFactory extends AbstractStrategyFactory {
private DefaultFactory() {}
static DefaultFactory instance;
public static synchronized AbstractStrategyFactory getInstance() {
if (null==instance) instance = new DefaultFactory();
return instance;
}
public MessageStrategy createStrategy(final MessageBody mb) {
return new MessageStrategy() {
MessageBody body = mb;
public void sendMessage() {
Object obj = body.getPayload();
System.out.println((String)obj);
}
};
}
}
public class HelloWorld {
public static void main(String[] args) {
MessageBody mb = new MessageBody();
mb.setPayload("Hello World!");
AbstractStrategyFactory asf = DefaultFactory.getInstance();
MessageStrategy strategy = asf.createStrategy(mb);
mb.send(strategy);
}
}
Re:Job or knowledge? (Score:5, Funny)
You really should use some XML to configure this application.
Re: (Score:3, Funny)
And it should be retrofitted to use the org.springframework.helloworld.core.* classes.
Don't use Java (Score:4, Informative)
Unfortunately Sun, in its infinite wisdom, has no idea at all how to patch. They have security vulnerabilities all the time and they make you install a completely new version of Java in a new folder each time. Their "updates" leave the older vulnerable versions behind (and still accessible by malicious code). Their updates break applications all the time. We are constantly having to deal with issues like the current one we have: there are known vulnerabilities in JVM 1.6.0_05b13, but there are some serious problems with deploying the "fixed" version as it causes bizarre error messages and slows Internet Explorer down. Both are acknowledged bugs, but won't be fixed soon. So you end up stuck between securing the systems and having the systems actually work right.
Sun Java is a continual nightmare.
I'll say one thing from Microsoft - when you could use MS Java it never (not once in the several years we supported it) broke apps and patches were actually PATCHES and not whole new broken versions.
Java - just say no until they actually learn how to update and patch correctly.
Start simple. (Score:5, Insightful)
Please, for the love of God, forget the frameworks. They come and go pretty quickly and each one is usually over-hyped to begin with.
Learn to be a great Java programmer. That means knowing the standard library in and out. Develop really good OO modeling skills. Learn what it means to write robust code. Understand and use exceptions effectively instead of littering blank catch blocks everywhere. All of these skills will serve you far better than knowing what arguments the RegistrarClassFactoryStubGeneratorJarBridge uses in its create() method. From there, as needs come up, you can experiment with higher-level abstractions. But please do NOT become one of those people that 'learns' that all database access should be handled through *insert-ridiculously-overcomplicated-framework-with-50-config-files-that-must-be-in-special-places.*
Aside: the reason Rails became so popular is because it managed to 'just work' without all of this inane configuration and magic files. The Java community is practically in love with complexity, since it is very enterprise-y.
Re: (Score:3, Interesting)
As far as I know and can see, there are no must-have frameworks or libraries, only sometimes-good-to-use frameworks and libraries.
Speaking of exceptions, do not catch Exception, and do not catch
Re:Start simple. (Score:4, Informative)
Many people seem to fancy rolling their own when they need something, without realising that it's already in the standard library. For instance, a couple of years went by before I realised that there's a Logger class to handle all logging needs.
Logging's a bad example. There were a ton of logging libraries around because Sun didn't bother adding logging until Java 1.4, and even then, their logging implementation is subpar compared to some other packages out there.
Speaking of exceptions, do not catch Exception, and do not catch Throwable, unless you know exactly why you should do that.
Oh God yes. I've forgotten the number of times I've seen the anti-pattern:
The great thing about that is that it means that there's no way to tell the difference between "an error occurred" and "the object doesn't exist."
I'd like to say this is less common now, but the last time I ran into it was last Friday, i.e., the last time I was at work. I spent a good chunk of time making methods throw exceptions.
This isn't to say that catching exceptions and ignoring them is never safe, sometimes it is. But unless you can come up with a good justification (and then leave a comment explaining it!), don't do it. It'll just piss off other developers when the applications randomly stops working for no readily apparent reason.
It's not the language - it's the libraries (Score:5, Insightful)
The key is the libraries: that's where it goes from being merely another OO language to being able to do something useful. I'd start by getting a simple "hello world" program running, then thinking up a home project which allows you to start adding features and functions.
Most of the documentation I've seen is pretty poor - it gives argument lists and describes functionality in isolation, but misses out the higher level WHY you would want to use a function. Learning that is where the gold is.
There is no single answer. (Score:5, Insightful)
Java's an entire ecosystem unto itself these days. So there's no simple answer - you have to figure out what kind of apps you want to be involved in building, then that will inform your choice of Java based technologies. For the most part I do enterprise web site development, and that mostly on the server-side, so I'm a Java EE/Hibernate/Spring/Eclipse person. Plenty of professional experienced Java developers will never use any of those technologies!
Once you've figured out what kind of apps you want to be building, I'd suggest visiting the Sun Forums [sun.com] if you have any technical question and then poking around the Java.net site, theserverside.org, JavaRanch and the java usenet newsgroups to get a better feel for what's out there and how it's rated by developers. Feel free to drop me an email if you have any questions that you want to ask offline.
Ignore the naysayers - for the most part they don't know what they're talking about. Sure you should have other languages under your belt, sure there's offshore competition, but still, Java experts are in demand and they will be for a long time yet.
My opinion of what Java APIs are worth learning (Score:3, Interesting)
The language itself won't be a problem if you've done C and C++, nor should OO concepts. So the difficulty is with APIs - what is worth it, and what isn't.
In terms of Java APIs (core or otherwise), I'd learn in roughly this order:
* Collections
* Reflection
* IO
* Servlets & JSPs then Struts, Tiles, Spring, etc
* JDBC, then Hibernate
* Axis (web services) and Apache HTTPClient
You don't need to learn them off by heart - I've seen people advance very slowly because they're trying to do that. It is enough to know what is what, so that when you have a problem, you know there is a solution, and where it is.
In terms of interfaces, I wouldn't bother with Swing or AWT really, until you need them. SWT ain't too bad (Eclipse uses it, and it's cross platform enough - Windows, Linux, Mac, Pocket PC, ...). Maybe you could be fancy and learn Fenggui instead! Then you could learn JOGL and write 3D games and the like.
Oh, and learn how to do Java on the command line first, use ANT to build and compile and deploy, then try Eclipse or NetBeans as an IDE. This way you'll avoid all the niceties that the IDE gives you that inhibits your initial learning.
I wouldn't bother with half of the enterprise wank, like Enterprise Beans and all that.
Consider not starting. (Score:2)
I don't know where else to go from there. There is so much!
There's a lot because Java web technologies are large and can be complex. This can be a problem in itself. It's hard to really understand what you're asking without understanding what you're doing now. Do you have a job, or are you just interested in padding your resume with a broader base of skills?
Here's what I'll tell you. It's useful to learn a broad range of skills, but at a certain point you're just spreading yourself thin. You're having
Just to add to the chorus (Score:2)
You've already got experience in VB and ASP...ASP.NET is a logical career path. You can use that as a springboard to learn C# and if you really want to you can learn Java from there.
Otherwise, the best way to get started in Java is to get a job where you can convince them you can learn it on the job.
One book: Effective Java (Score:4, Informative)
Once you get the basic Java syntax (which will not take long looking at the langages you already know), read this book: Effective Java [sun.com] , by Joshua Bloch.
There is also a video on YouTube: Effective Java Programming with Joshua Bloch [youtube.com].
And you can read it on Google Books [google.fr].
Re: (Score:3, Informative)
That version on Google Books is the first edition, from 2001. It only covers feature from 1.3 and earlier.(Only a handful of 1.4 features were touched on).
The second edition was released last month and now covers up through 1.6.
http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683 [amazon.com]
Groovy (Score:5, Interesting)
I'd suggest starting with Groovy (http://groovy.codehaus.org/) then perhaps move in to Grails (http://grails.org). Groovy is a dynamic language that runs *on* the JVM, and can co-exist with native Java code, but requires far less boilerplate code to get anything done. If you're coming from a dynamic language background, Groovy will be a bit easier to understand.
This will allow you to get involved with Java technologies without as steep a learning curve as you'd require if you were doing it 'from scratch'. You can incorporate as much 'other' Java tech as you want as you go along, but you'll be up and running fast with Groovy.
http://michaelkimsal.com/blog/grails-for-php-developers/grails-for-php-developers-part-1 is few part series on did on Groovy and Grails for people coming to it from non-Java backgrounds. Never quite finished the series, but it's someplace to look to see if it's something to investigate further.
Good luck!
Avoid persistence frameworks (Score:4, Insightful)
If you are a serious programmer and want to solve real business problems, concentrate on what Java does well - glue things together and use well thought out class structures to map onto the things you want to do.
In my admittedly limited experience over only 25 years or so, if you leverage the strengths of Java you can do things you can do in other languages about as fast, with good reliability, good debugging, good code re-usage and rare platform incompatibilities.
Oh, and get used to Derby (formerly Cloudscape), because you can then have your SQL database all bound up in your 100% Java application and still talk to spreadsheets etc. as easily as if you were using Access.
Re: (Score:3, Insightful)
They try and force you to do things the way the Hibernate developers think
This is somewhat true.
and this is not good because they just regard the database as a persistence layer
This not so much.
I can't speak for other persistence layers, but Hibernate specifically is a good choice if you are designing a schema from scratch. It can be applied to pre-existing schemas (legacy stuff) but the less well designed that schema is, the more painful Hibernate will be to use.
If you disagree, perhaps you could cite some specific things that you think are wrong with Hibernate's default approach, or where you believe it fails to support some legitimate structure in the data
Some Pointers (hehe) (Score:5, Insightful)
It's a difficult industry to get into as you're probably aware. Recruiting for Java posts is a minefield - it's full of people who should be stacking shelves in a supermarket.
I don't think you can go far wrong if you get as much experience in core Java as possible. The same goes for J2EE; if you understand what it is and know the trials and tribulations of building a web-app from scratch, you're on the right track. Then, and only then, should you move onto working with frameworks; so build applications both stand-alone and web, and do the boring stuff yourself (i.e., write your own web.xml.)
Spring and Hibernate are funny ones. Spring's just an IoC framework. Until you're proficient in OO design, you probably shouldn't worry about it. Oh, and learn what IoC is first. Don't just think 'spring' and say you know it. Very few people know why they chose spring as a framework (there are plenty of IoC containers out there).
Hibernate (an ORM solution) is a dark art. Get the basics done first. Write JDBC DAOs yourself and learn why you'd need ORM before you dive into it.
Basically, learn the core concepts.
Re: (Score:3, Insightful)
If you look at the bigger picture Java, C and C++ are all just languages
Except that Java is a couple of things other than being a language.
Java means different things to different people. I think the original questioner would like to know what Java should mean to him.
My own recommendations (Score:5, Informative)
Ensure your concurrency skills are up to snuff. Read about the newer (1.5+ so not that new admittedly) ways of handling concurrency in Java - a lot of older books will miss the java.util.concurrent frameworks.
Persistance frameworks are all well and good, but understand the fundamentals of how things work at the database level inside Java.
Although this changed a little with the latest rev of EJB, many sites simply dumped it and went with Spring. Worth knowing.
Pick one and know one, use that to extrapolate to the rest. My own advice is to look at Tomcat, but just knowing the basic concepts behind them is a start.
There's probably a lot I've missed, but right now I'd consider looking at those.
Cheers,
Ian
Two words (Score:3, Informative)
Suggested books and tools (Score:3, Informative)
BOOKS
-----
Learning Java (O'Reilly) - one of their better books in recent years, and actually kept up to date with new editions
Effective Java (Addison Wesley) - preferably the second edition, which covers generics
J2EE Design And Development (Wrox) - heavy going, but it's simply the best book on J2EE development
ANT In Action (Manning) - describes the de-facto build tool in the Java world, which can also automate things like deployment
TOOLS
-----
Checkstyle http://checkstyle.sf.net/ [sf.net] - a basic static analysis tool
PMD pmd.sf.net - a more advanced static analysis tool
THINGS TO AVOID
---------------
EJB - it's gotten better in version 3.0, but a lightweight framework like Spring is still a better choice for almost every project
Maven - it might be great for some Apache hosted projects, but it's caused more problems than it solves on every system I've worked on with it
A straight answer: servlets, then JSP (Score:3, Interesting)
A straight answer: leverage your knowledge of web development by starting with servlets, then move on to JSP.
Regarding tools, I've had good results with NetBeans with both novice and veteran Java developers. The "Web & Java EE" bundle comes with both Apache Tomcat.
there! (Score:3, Funny)
The point I miss is the "why?" (Score:4, Informative)
So, while I get that the asker of the question is very serious, and some people answering him also, I don't get what the motivation about questions like this are. I mean: the guy tells us he basically knows everything (languages, tools, concepts) that is important about "programming".
So I would ask the asker: why do you want to learn/use Java?
So, the simple answer to his question is: ;D and a very short introduction into the syntax of Java)
just start coding. Besides an IDE you don't need anything for starting to work with Java (probably knowing how to browse Java Doc
The more complex answer: ... you don't really specialize your skills and neither you really broaden your skills (Java, C# etc. don't really add anything you don't already know from C++). You only add some TLAs to your skill set and you fit "at a first glance" better to job descriptions.
If you add Java to your language zoo
UML ... not MDA, that is to complex) will broaden your spectrum. Hint: Eclipse + OAW might be interesting to you. OAW is a MDSD tool chain, based on Java (if you use that, you will program a little bit in Java). With OAW you basically write your own generators, to transform specifications from UML into your language of choice (via templates and "Scripting" in Java)
If you did not use UML so far, you don't need it for Java either. However: learning UML and something about Model Driven Software Development (MDSD
Databases, Hibernate, MySQL ... but it goes to far to discuss this here) and also don't dig into JDO (Java Data Objects, a Java API) while the base idea is not to bad, most implementations just suck.
If you want to work with DBs you need a very basic knowledge about JDBC (a standard Java API) because all DB Frameworks use JDBC under the hood somehow / somewhere and the configuration of your DB access (URLs, Users, Passwords, Connection Pooling) will be always very similar regardless what framework you use. Besides Hibernate I would suggest to look at iBATIS, also (you will need the iBATIS book). EJB 3.0 is overkill IMHO (yeah it is not only persistence but also services etc.
Swing
First, a lot of people out there find Swing over complex and prefer SWT. I strongly suggest that you stick to Swing for several reasons. The complexity of Swing might increase your learning curve a bit. However, sooner or later you will need the features Swing gives you. And when you are a bit experienced in Swing, you will be very fluent with it. Note: Swing will be greatly improved in Java 7, when the "Swing Application Framework" is integrated (beta of that is available for Java 6 right now).
Similar to Swing and probably interesting for you is googles GWT (Google Web Toolkit). The programming model is very close to Swing. GWT is used to program (preferred in Eclipse, using the GWT Plugin) in Java, having Server side Code in Java, running on a Web Container (e.g. Tomcat) and having client side code programmed in Java, but cross compiled into Java Script running in a Web Browser (AJAX style).
Beyond Java ;D).
Just learn enough Java to be able to compile simple programs (well, 2 days or something
Then learn Groovy. Groovy is a "dynamic" language, that compiles to Java Byte Code and integrates into the Java Platform. Groovy is mainly used for scripting, but it is a serious platform for development as well. Groovy is also used to develop Domain Specific Languages(DSLs), one thing that will become a future market.
Dig into Ant, a "XML based scripting language", mainly used for build files. But don't be tempted to use it for to much. If you find Ant useful, and if you got a grip on Groovy, then use gant.
Groovy uses a concept of builders which is used e.g. to program Swing UIs, to "build up" Ant-Scripts (gant), to "invent" DSLs (for configuration of your Java/Groovy programs) which can be adapte
Generic Non-Crap List (Score:5, Insightful)
Considering that Java has been (probably) the most used language for a while, you get a lot of crap. So, here's my "crap filter" list of what you should learn to really hop into the JVM ecosystem.
Books:
1. Effective Java, 2nd edition, by Josh Bloch
This covers most of the twists and turns of the basics that an experienced programmer would need. I wouldn't worry about getting a simpler book.
2. Java Concurrency in Practice
Understanding the JVM model of concurrency is important, and this is the only guide that had a pretty in-depth look into the subject. The Sun documentation absolutely sucks at covering concurrency.
APIs
1. Guice http://code.google.com/p/google-guice/ [google.com]
Dependency injection is the most recent thing that makes Java a very powerful language for building large appications. And Guice is by far the best implementation of DI. (Yeah, you could learn Spring, but I just don't care for it.)
2. Hibernate http://hibernate.org/ [hibernate.org]
I hate Hibernate. But it basically set the standard for EJB3. If you know Hibernate, it's not a very hard road to learn all the other "enterprise" crap.
On the other hand, any substantial server-based solution probably uses a ORM solution like Hibernate.
3. Apache's Commons http://commons.apache.org/ [apache.org] and Jakarta http://jakarta.apache.org/ [apache.org]
There is a ton of projects under the Jakarta umbrella these days. The first one to try out is the commons-lang libraries, which provide very easy to use toString. equals, and hashCode implementations that are 'good enough' 99% of the time. Why do you need those? Read Effective Java. :)
Interesting stuff:
1. Hadoop http://hadoop.apache.org/ [apache.org]
Hadoop is an open-source implementation of Google's MapReduce idea.
2. Scala http://scala-lang.org/ [scala-lang.org]
Scala is my favorite "non-Java" JVM language by far. For me, the scala interpreter is how I learn APIs. In fact, most of my new code is in Scala, not Java.
3. Groovy, JRuby
Just some more used non-Java JVM languages. I've used JRuby a bit, but have moved on to Scala. It's still a significant project, however.
4. Web application frameworks: Wicket http://wicket.apache.org/ [apache.org] + Databinder http://databinder.net/ [databinder.net]
Wicket is the simplest page-based Web framework I've ever used. I just find it easier to navigate than Rails. If you really want an ORM-based solution, go for the Databinder extensions. Databinder will get you coding in a couple of minutes.
5. Restlet http://restlet.org/ [restlet.org]
We have several different clusters, and a bunch of machines that need to transfer data around. I learned how to set up a restlet server that was integrated with Guice in a couple of hours, and now, have a very easy means to script together many different servers.
Java, Where To Start..... (Score:3)
1) Slect you favorite type of beans.
2) Grind beans to the desired coarseness.
3) For a common electric coffee maker, wash coffee pot thoroughly, insert clean filter into brewing area, and replace pot under the drip.
4) Add the desired quantity of ground beans to filter.
5) Add water to reservoir.
6) Turn coffe maker to "ON".
Sun Java Tutorial (Score:3, Informative)
Wow, what a load of advice to launch into frameworks, buy books, get certification etc.
Start with what's authoritative, basic, and free. That's the Sun Java Standard Edition tutorials
http://java.sun.com/docs/books/tutorial/ [sun.com]
Or download from:
https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=tutorial-2008_03_14-oth-JPR@CDS-CDS_Developer [sun.com]
The web and persistence frameworks are important. They're over-engineered and I hate them but if you don't know them you won't get work. (Without them it'd be very much like trying to become a game developer knowing only ANSI standard C and no frameworks). They're what you need to learn second. Possibly on a smaller project where you're not the lead. However learn to crawl before walking or flying.
Re: (Score:2, Informative)
I never really liked NetBeans, I tried it with ver 5 and decided to stick with IntelliJ and Eclipse.
Recently I decided to give NetBeans 6.1 a try and was quite impressed. There was little/no noticeable lag, unless I was coding while I was "running/debugging" a long-running process.
There are many things it does that I like over Eclipse.
Re:Good place to start... (Score:5, Insightful)
I never really liked NetBeans, I tried it with ver 5 and decided to stick with IntelliJ and Eclipse.
This is one of the examples that us Java foreigners want to learn. Here are some Java buzzwords that you see in jobs asking for devs:
Netbeans
J2EE
Eclipse
Jakarta
Struts
MVC (which isn't a java-only concept, but then again, newbies don't know)
Websphere
I really wish there would be an "intro to java technologies" book that explained newbies like me, with diagrams and colored figures what the heck is each buzzword and what it means, but I don't just mean a dictionary paragraph.
See, anyone could spend a couple of days googling each buzzword, but then there's the problem that one could learn TOO MUCH and get TOO DEEP trying to undersand ONE OF MANY things in java. And then you can find out that what you learned won't get you anywhere because suddenly the technology you learned became obsolete.
Around 8 years ago, I tried to learn java and JSP, and then found out that everyone switched to J2EE. Then I tried to learn J2EE and completely got lost. Then I tried to look at some J2EE courses sponsored by IBM but they costed at least $600. Then I said "fuck it, I'll stick to PHP. I can install an Apache webserver in one click on my Windows compy and I'll learn PHP on my own - for free". Try that with Java. See, the problem isn't the language itself, but the bunch of stuff built on Java, the frameworks built on java, AND the popular apps built upon some of the java frameworks, which is actually what the companies expect you to know.
What we need is a broadth-first approach of learning, starting with the language (one chapter for the java basics and examples should be enough). I mean explaining only the basics of each, comparing different technologies, telling you where they fit in a web app, and which ones are recommended or not, and why.
Re: (Score:3, Insightful)
Try Wikipedia, it has articles on each of the things you list and lots more. Unlike projects' individual sites, it tends to start by telling you what each actually does. Most of them are hardly earth-shattering, it's just that Java developers seem to like assigning a silly acronym or coffee related name to every equivalent to a CPAN module.
Re: (Score:2)
Eclipse is pretty good actually, I hated netbeans too.
Re:Good place to start... (Score:5, Funny)
Is Visual Studio actually written in .NET? Eclipse is... Is IIS written in .NET? Tomcat is.
.NET must have lots going for it if even Sun are writing all their tools in it.
Re: (Score:3, Informative)
Dice.com -
Search Java - 14480 hits
Search C# - 7146 hits
Re: (Score:2)
I agree that C# is a nicer language than Java, but Eclipse is so much better than Visual Studio out of the box. I use an add-on called ReSharper which makes VS almost as good as Eclipse, but not quite.
Also, knowing java allows you to learn C# very, very quickly, and then you can decide for yourself which language you like better.
Re: (Score:3, Interesting)
I wouldn't say that C# is easier or more powerful. It's similar to Java, but also different.
And personally I don't like the Visual Studio environment. It has some advantages if you develop specifically for Microsoft environment, but if not you are at a dead end. (Yes I know that Mono exists, but still)
Re:In the same boat... (Score:5, Informative)
Ummm, what? Eclipse is an IDE, Tomcat is a container for web servers. Tomcat and Apache can be used with Eclipse with a nice little plugin [eclipse.org] for testing.
Re:In the same boat... (Score:5, Informative)
Ok, you're missing my point, which is that Eclipse and Tomcat have absolutely nothing to do with each other. You don't need to "switch" from one to the other because they are used for entirely different purposes. Yes, they're both tools, but it doesn't make any sense to tell the parent that you switched because one is used to write code and the other is used to serve applications. It makes you sound like you don't know what you are talking about, and will only confuse new developers.
Head First Java (Score:5, Insightful)
O'Reillys "Head First Java" is IMHO the best technical resource / learning tool I've ever used; it's honestly fun to read. You can read it online for 30 days free using the Safari service.
A favorite excerpt of mine (on how to remember the single-inheritance, multiple-interface concept):
Roses are red,
Violets are blue,
Extend only one,
But implement two!"
I beg to disagree (Score:5, Insightful)
Java is a good language to learn for the current marketplace.
The real problem thats putting people at risk of outsourcing is not the choice of language.
Its all about your skill as a programmer. If you're average, then there are plenty of average coders willing to work for less in India.
No, you've got to be better then average, great even, and that takes a lot of work.
Re:I beg to disagree (Score:4, Interesting)
Come on now. I'm getting tired of all the "I'm thinking of learning $fooCommonThing and I need Slashdot to spoon feed me Google results." type questions.
I cannot believe this made front page when there are other, rather good questions in the firehose that would result in good dialog and idea exchange, but that get rejected.
Seriously, is there some shortage on Java dicumentation out there or something? Granted, I don't know the language as I never had a need for it, but I can't trip over without falling into a pile of Java tutorials.
Here's my answer [mrnaz.com] to this particular Ask Slashdot.
Re: (Score:3, Insightful)
Re:I beg to disagree (Score:5, Insightful)
Re:I beg to disagree (Score:5, Insightful)
However, wrt to this particular question, if you look closely he wasn't asking "how do I learn Java" or "where can I find info about Java", he was asking for those with experience to help direct his path of learning. It is precisely the abundance of Google results that probably prompted this question.
I know that on broad topics I am often frustrated by the abundance of crap that I have to wade through in order to get to the few gems that are worth reading. When it comes to long-winded textbooks and weeks-long learning processes I would be more than happy to allow someone with years of experience to direct me to the optimal path of learning (why going to school still makes at least a little sense).
Re:I beg to disagree (Score:5, Insightful)
As someone who has interviewed and hired a lot of Java developers I'd tend to agree with the parent. In interviews it's very easy to figure out who learned Java simply to put it on a resume and who actually knows how to use the language, and the submitter seems like the latter. Rather than setting out to put Java on your resume, pick a project, find the best tools, and then put that on your resume. For example, set up a personal web site and create a Java message board - you'll probably learn a bit of JSP, Tomcat setup, and JDBC in the process. Alternatively, set a goal of contributing to any one of the ten bazillion open source Java projects out there, or find some other project that interests you. But don't come on Slashdot and basically say "I want to get Java on my resume" - every resume I see has "Java" on it, and it's easy to tell the folks who have experience doing something with Java from those who read a couple of O'Reilly books thinking it would get them a job.
You totally missed the point (Score:5, Insightful)
Seriously, is there some shortage on Java dicumentation out there or something? Granted, I don't know the language as I never had a need for it, but I can't trip over without falling into a pile of Java tutorials.
That is precisely the point of the question. You could quite easily spend 6 months solidly reading the stuff out there, so what OP is looking for is a recommendation or two to save him spending months finding the stuff that's worth reading in the piles of dross. I'm hoping there are some good answers, because I to would quite like to get a handle on the more enterprisey side of Java.
Re:I beg to disagree (Score:5, Informative)
Doing java dev for more than 10 years, I think this is a valid question. Java is not about the core J2SE anymore, I was fortunate that java evolved along with my career, so i picked things up as they came to market. Further google is excellent if you know what you are looking for, however in this case, the author does not even know what he is looking for.
Now to answer the question.
First read Just Java by Peter van der Linden (if I spelled the name correct). Excellent book.
Get Eclipse IDE and learn jdbc, JSP/servlets, and struts preferable in that order. Except for struts Just Java should give you a primer on each, struts has a decent website with tutorials.
I would skip EJB/J2EE for now and jump to spring and later hibernate. You will find great tutorials on their websites.
Somewhere along the process also introduce yourself to JNDI, particularly JNDI when it talks to LDAP, this is a given when u are coding an enterprise app.
At this point you would know enough to do a decent job as a java developer, more importantly you would know what to do next.
This is what I can think of on labour day long weekend :)
Struts (Score:5, Insightful)
As a Java developer for nigh on ten years now, and someone who painfully learned how to program database connections by hand, then use orms like Hibernate, I might caution against Struts (though the rest of your order-of-learning is excellent). Struts was definitely in my path of learning, but I am not sure what it offers these days that isn't done more comprehensively - and to my mind, more cleanly - with Spring.
Of course, there are a lot of legacy systems these days built on Struts - for good reason. So if you're looking to work on older code, it's not a bad thing. But if you're planning a career with stuff that is from scratch, I think that Spring forces one to code in a better manner than nearly any other framework out there.
It may be, of course, that I'm just in love with inversion of control - which I think is one of those things that, if you understand it, gives you a much better command of abstracted design.
One other thing I think is pretty cool is JavaBLACKbelt [javablackbelt.com], which has a pretty good, community developed set of quizzes that are useful for gauging your own command of the language.
Re:I beg to disagree (Score:5, Insightful)
Seriously, is there some shortage on Java dicumentation out there or something?
Quite the opposite. There's such a fucking huge load of Java stuff out there, that it really is hard to figure out where to start. In fact, the immense amount of Java architecture is the single largest hurdle for new Java programmers.
So here's my advice:
Do:
Dont:
All of this just IMHO ofcourse. YMMV HTH HAND.
Re:I beg to disagree (Score:5, Insightful)
Agreed. I don't see how anyone would be unable to find information about Java.
Doh! Ever heard of the term "Information overload"? The problem isn't that he can't find info about java. The problem is that java is so f***ing complicated that you would need a 3D map to start with it.
Where I live there are very often job postings requesting java programmers expert in X,Y or Z framework (struts is a famous one), who have also worked with Netbeans and some other stuff, and it's preferred if you have worked in XX, YY and ZZ java stuff.
See, one thing is knowing PHP and a couple of frameworks like Drupal / Joomla, and some standard toolkits like PEAR. But java is a super-complicated behemot. Some guy showed me a diagram of java classes and it was a poster that occupied the space of an entire whiteboard (the big ones used in classrooms). How can you expect someone not to get scared at that thing?
Re:I beg to disagree (Score:5, Informative)
You have to start somewhere. Just like if you wanted to learn PHP, the PEAR toolkit, and Drupal or some other 'framework' for Web applications in PHP, or whatever. Or, as an example I'm more immediately familiar with would be knowing Python, mod_python, Django, WSGI and a database like MySQL or Postgres.
You start by learning Python. Then you move on to MySQL. And then you might learn mod_python and finally WSGI and then Django. But you have to start with one concept and move on the next and the next and the next until you have enough knowledge to cover what you need to know.
So with Java, you might start with Java, move on to Netbeans, etc. Learn any frameworks, etc. You start with one thing and move on to the next. YOu need to learn increasing levels of complexity. SO obviously you need to have a grounding in Java before you learn Swing. And Java basics before J2EE. And so forth.
Re:I beg to disagree (Score:5, Informative)
As regards frameworks, take a look a Spring - but not until you understand core Java (the principles, not the libraries). Spring has a Web Container but Tomcat is better if starting from first principles (or, at least, it used to be good. It's the "reference" Servlet container, for what it's worth). EJB container: do it with Spring (or some such). JBoss has (is? I don't know any more) an EJB container. EJBs are low-priority: they're really just a kind of "sandbox" environment where resources are closely managed. Thankfully, that environment has just become easy to program.
As regards IDEs, Eclipse is what I use ATM. Most vendors' IDEs (IBM, Oracle) are built around Eclipse. It's pretty easy to run simple programs there but the interface isn't very familiar (jargon-wise) to newcomers. I hear that NetBeans is very good these days.
Re:I beg to disagree (Score:5, Informative)
That should give you enough to get started and maybe even get your first Java gig. Hibernate's good to learn, too, but on most of the projects I've been on, you don't use it in day-to-day development (that is, you don't have to reconfigure or redeploy anything, unless your data model changes). With Spring, just about everything you write will require that you modify a context file or two, so you need to know what's going on.
Re:I beg to disagree (Score:5, Insightful)
I read this argument often here in slashdot...you seem to believe that all Indian programmers are average or below average (compared to American programmers) so not being outsourced just a matter of working hard.
Guess what, because their population is almost 4x the US' and generally speaking they have more serious unsatisfied needs, your solution will not work. In fact it will do the opposite, as everyone (worldwide) will work harder therefore giving more for the same money.
I don't have a fair solution to the global outsourcing problem but it can't be 'working harder'. Time for other things is important, you know.
Re:managers just don't care about skill level (Score:4, Interesting)
In my experience, managers don't tend to care one whole hell of a lot about the skill level of local employees when a job goes offshore. You could be the worst or the best; at the end of the week, you are still laid off so that Anand & Prasun can have your job.
Then don't work for companies like that.
Any heavily outsourced software house is screwed if its working against another which has skilled, highly motivated staff. Outsource workers have a task to do, they do it, and they cease to care. You don't get innovation that way, you just get lines of code.
Re: (Score:3, Insightful)
There is a difference between computer science and writing business logic.
Re:Don't (Score:5, Insightful)
Re:Don't (Score:5, Informative)
Portability is a nice word that Java people like to throw around, but in my experience, the program has to be set up separately for just about every target. You can do that just as well with C (Brew, as far as phones are concerned), and without a handful of different project files to include or not include target-specific files.
Not to mention that, on comparable phones, Java performace is abysmal compared to Brew. Not fast.
Java has its place, where its benefits can be well exploited. That place is, as far as I've seen, largely restricted to situations where the systems it'll be running on are not terribly diverse, e.g. Linux servers, where portability really isn't that much of a concern.
Re: (Score:3, Insightful)
Did you just call Java fast and clean?
Really?
I'm sure he means 'compared to the .NET framework'.
Re:Don't (Score:5, Informative)
As someone who's worked in Java with some of those 100.000 guys in India, they may know Java, but most don't know java well. The vast majority of programmers either here or there can solve a problem, but not consider the security risks in their solution, nor necessarily come up with an elegant design for doing so.
Having said that, I've used hibernate (once, to get it set up and configured, it works well enough we didn't have to go back and change it), struts/struts2, and tiles. Most of these are XML configuration rather than coding. If you can do make files, and handle any markup language, these won't be a problem.
It sounds like your main concern is learning java itself. Since you know C/C++ the syntax and conceptualizations won't jump out and bite you. I'd recommend grabbing a project that interests you (or that needs to be done), and just doing it. Use Eclipse, its tools will make your life MUCH easier (unless you like coding c/c++ in a vi-like environment, in which case by all means use emacs/vi/editor of choice). I'll probably get slammed for saying this, but learning java isn't any harder than learning VB, (easier than C/C++ which is what I'm currently picking up), it uses a different namespace, and slightly different approach, that's all. If you're a competent programmer (and from your post, it sounds like you are) then it's just going to take some time/hard work to get used to the new language's quirks.
Re:Don't (Score:4, Interesting)
I would have to agree here, as someone who knows J2EE.
I studied J2EE application development a couple years ago, when it was supposed to be the "new" next big thing.
I was already bought, and for all my term papers, in every language course that I wrote, was touting how the future was Java and J2EE.
In the real world? Its not. I would say, stick with the languages under your belt as they're the most marketable tools in the world.
My opinion was completely reversed, because in a world where opensource is aspiring and component based development is becoming cleaner and easier, the languages with most opensource software, such as C/C++, PHP, Perl, MySQL, etc will grow even faster.
Look at it this way, Php 4.x as a non object oriented language, and php 5 as a 80% object oriented language has more freely available software available for coupling than Java does.
Client/Server Development -- I would focus on the Javascript framworks, Flex, Google Gears, Adobe AIR, etc. + what you already know.
Re:Don't (Score:5, Interesting)
Maybe, but I'll say that it's not a bad thing to be able to know Java.
There are benefits and there are drawbacks with Java, as there are with other languages. The drawback with Java is that you don't have any control over memory management, but the benefit is that it's easy to program in if you have been working with C and C++. And you will at least not suffer from some weird bugs that you can get in C or C++.
For beginners in Java I usually recommend JavaRanch [javaranch.com].
And to develop I recommend Eclipse. It works fine and can give you instant feedback on many issues. Of course - it has some quirks too, but so does every tool.
And if you want to select a more extreme language I would recommend Erlang. It has a completely different approach than normal procedural languages, but sometimes it makes more sense.
Re: (Score:3, Insightful)
Java is a mess (Score:5, Insightful)
Honestly, all of these acronyms you can list, and yet you don't have the initiative to learn another language without posting silly questions like this?
It's not about "learning a new language". Learning Java is trivial. The problem is the hundreds of bloated, redundant, incompatible "frameworks" and "libraries" that exist for Java. Which one to learn is a valid question (albeit, it doesn't have a good answer).
Re: (Score:3, Insightful)
try to learn hibernate, which will be the last time you think about databases.
LOL there is no other API where you think more about databases than Hibernate. The simplicity is deceptive.
Re: (Score:3, Insightful)
When we talk about Java we mean JavaEE, not standard application programming. Sure Java is no better than most other languages when it comes to building small to medium desktop apps/clients. But once you go past a certain point in size/complexity Java is your friend. Perl and php are not. JavaEE is meant to be used for large (really large), complex, distributed, high-availability business systems. And it's damn good at it.
There is a reason most systems of this type are built in either J