I'm a CS student and my Java skills aren't nearly as solid as they should be. Even at a top University it was a class that wasn't very well taught.<p>Learning web languages (Ruby in particular) is very easy to get into due to the fun tutorials available. I'm tempted to learn Ruby and hope it also enhances my Java/general programming knowledge.<p>Before I learn yet another language, is there a fun way to learn Java better (OOP concepts in particular)? I saw the Play! framework and thought that might be quite fun to try out, but doubt it will enhance my actual Java knowledge.
Given that the language itself is so very mundane, I'd recommend implementing a fun and challenging <i>project</i> of your own choice -- in Java, of course. Preferably one that won't consist of plugging framework A into framework B.<p>Language-centric tutorials won't get you far in Java because there's not much to discover. Python or Scheme or Haskell elicit a "Wow!" every now and then. Java is all about libraries, tools and ecosystem. It's a language that very much disappears behind its immediate surroundings -- counteract that by extensively <i>using</i> the language.<p>So go and grab that Play!-thing, and build something reasonably awesome.
I was in the same boat as you when leaving college — I knew the Java _language_, but I didn't really know _Java._ Prior to my first job I always thought of Java as "that big ugly language," but after a few years there I really started to get it.<p>A few things that made me enjoy Java more:<p>• Use an IDE Eclipse, IntelliJ IDEA or NetBeans. Vim can't handle things like automatic imports and serious refactorings like "extract method."<p>• Use packages liberally. Start your project inside `com.mistrq.myproject` and make a good, semantic hierarchy.<p>• Write applications with Guice. Program to interfaces and bind concrete classes at runtime. Dependency injection lets you easily turn a giant, hard-to-comprehend project into manageable chunks.<p>• Be liberal with interfaces. Sure, we had a lot of single implementations for interfaces, but using Guice made it trivial to swap out implementations for experimentation.<p>• Write tests. Use whatever's popular for unit tests right now, and check out EasyMock for amazingly-easy creation of mock objects.
The only Java program of any consequence I wrote was a multiagent autonomous robot simulator (sounds more complicated than it actually was :-) for an experiment in independent agents. It was fun, but after I was done, there was absolutely no motivation left to continue and I soon got into Python instead.<p>Java is simply not a "fun" language! If you're a student and looking for a job, knowing the language basics is enough, no one hiring out of school will expect you to be an expert. Much more important to know the OO principles it's supposedly based on.
One of my first encounters with Java was in writing silly IRC bots with some friends. Easy and fun.<p><a href="http://www.jibble.org/pircbot.php" rel="nofollow">http://www.jibble.org/pircbot.php</a>
Will learning Ruby better give me a new perspective and reinforce my Java knowledge or will it just distract me?<p>I'll already need to learn extended ML for my functional programming class this semester (previously done haskell). I use php at work when doing front-end web dev. I wouldn't mind increasing my javascript skills also. So I'm afraid of being jack of all trades, master of none.<p>I know Java better than I think I do. It's all the libraries and frameworks that I need to become familiar with.
Make an application for Android, that logs your GPS position and sends it to your personal website for your friends to check.<p>(trust me, it's fun and you can steadily see your progress)
I was learning Java at work but also picked up Ruby on the side to do some scripting work at the same job. Through Ruby I learned truly about first class functions, closures, etc and then took that knowledge over to Java. I also highly recommend the first edition of the Ruby "pick axe" book. It is a <i>great</i> OOP book.
codingbat.com offers online programming exercises in java. Since you already know the basics, it would be a good way to reinforce the skills you've learned.