Dark Bit Factory & Gravity
GENERAL => General chat => Topic started by: Shockwave on December 16, 2009
-
I am looking to teach myself Java over the next few weeks, what books / resources / tutorials would you recommend?
Cheers.
-
I found some free ebooks:
http://www.techbooksforfree.com/java.shtml
http://www.java201.com/books.html
I have no idea if they are useful or not.
-
@Nick:
How comes that you wanna take a peek at Java programming? Just curious
or do you want to have a bigger project in mind ?
Anyway, here are some of my links:
Basic stuff from the inventors of the language itself:
http://java.sun.com/docs/books/tutorial/java/index.html (http://java.sun.com/docs/books/tutorial/java/index.html)
Applets related tutorial
http://www.java-tutorial.net/ (http://www.java-tutorial.net/)
Lot of applets with source (if you wanna learn by example)
http://javaboutique.internet.com/cathome.html (http://javaboutique.internet.com/cathome.html)
Good luck!
-
I've done a bit of Java programming, but I wouldn't say I'm any kind of expert - it was all maintenance. I use Jetbrains ItelliJ Idea which is an excellent IDE with intellisense and refactoring tools built in.
Jim
-
Speaking of IDE's targetting Java programming I really do
can recommend Eclipse platform. Beside the fact that it
really suits all my needs - the amount and quality of plugins
which are mostly freely available is so immense.
-
Thank you for the tips :) Plenty of things to check out there.
Benny: Well, it's a possible job that makes me want to learn Java, I have applied for a transfer at work to another department, the job I applied for is developing on a system called CDL which is pretty specialised but there is also another job advertised there writing Java stuff so I figured that I'd try and give myself the best chance.
After all I learned how to write console apps in C++ and Java doesn't look to be all that different to it so hopefully I'll take to it well. :)
-
@Shocky:
Ok, then forget all Applet related links I posted above. This would just
be irretating and would not lead you to what you wanted I guess.
I can recommend the following great tutorial dealing with the basics:
http://chortle.ccsu.edu/CS151/cs151java.html (http://chortle.ccsu.edu/CS151/cs151java.html)
What I really like about those tutorials is - that they are clearly spread
into small units. That makes them really easy to understand. In addition
each Chapter/lesson is split up on multiple pages - that makes reading
them much more easier IMHO.
Finally, there are excersises and quizes to revise the chapter's content.
I do not know how much object-orientated you coded in the last time -
but since Java is 100% object-orientated I would really recommend to
read and understand those object-orientated paradigma and start thinking
in Objects. (Refer: Part 6: Object Oriented Programming).
Another advice would be to find out the development tools they are using.
If they use open source products (like Eclipse e.g.) it might be a good
idea to use them, too. This might give you some extra bonus when you
apply for the new position.
Good luck!
-
I am looking to get this all set up this weekend after I've dealt with the insurance and car hire people, that page of tutorials looks really good.
I'll see whether I can find out what development tools they use too, good tip. Thanks mate.
-
I guess the huge difference between C++ and Java is the memory management. In C++ you need manually to track everything. Anything you create you need to delete. In Java (and C#) that's not the case, objects get deleted when no one is using them any more. This sounds quite scary but it is actually very, very cool indeed.
Jim
-
That sounds neat :)
-
I'd start using Eclipse if I were you Bro ;)
-
Eclipse looks excellent, I downloaded netbeans and Eclipse, I prefer Eclipse already.
-
It's what JB and Super Tom use. I think it's close to the backward system that is used for the RTP programmer job.
-
I prefer NetBeans because it's more stable and better implemented. But if your learning Java for a job then Eclipse is the way to go. Good or bad, the vast majority of companies use Eclipse for writing Java.
For a book I'd recommend Effective Java (http://www.amazon.co.uk/Effective-Java-Second-Joshua-Bloch/dp/0321356683/ref=sr_1_1?ie=UTF8&s=books&qid=1261082207&sr=8-1). If you know C++, then learning how to write Java will be trivial. It's learning how to use it which will be difficult. This book essentially tries to teach that, it's guidelines and best practices for writing good Java code.
I learnt Java using Objects First with Java (http://www.amazon.co.uk/Objects-First-Java-Practical-Introduction/dp/0137005628/ref=sr_1_1?ie=UTF8&s=books&qid=1261082409&sr=8-1). Rather then teaching Java, it teaches object-orientation using Java. The difference is that your code is only object-oriented and well designed if you write it in an object-oriented way and design it well. The book is primary aimed and used by first time programmers (for example it's on about page 100 when they introduce the for loop), so it's probably not best for you. But for anyone else who's just starting out I'd highly recommend this book.
-
Thanks JL235, thanks for the advice.
That's going to be the thing I need to concentrate on. I am old-fashioned and a procedural programmer, also I am not used to the eclipse IDE and writing programs as projects.
I found some great video tutorials by Mark Dexter that explains how to use the Eclipse IDE while introducing some programming.
I think I'll take a punt on Objects First With Java, got to be worth a look.
-
A new edition of Objects First came out not too long ago, the fourth edition. So if your interested in saving a few quid then you could probably get the third edition (which is the one I own) for a less second hand. I wouldn't bother with an edition older then that.
-
Eclipse is retarded. But a lot of people use it.
Jim
-
No one mentioned Thinking in Java yet? http://www.faqs.org/docs/think_java/TIJ3_c.htm
Good free online book.
-
Thanks Madeyes, I'll check that out too :)
-
Objects First came out not too long ago, the fourth edition
It arrived today and looks great :) Thanks for the advice.
-
I am really enjoying this book, it's gentle and at the same time really informative, I would reccomend it to any would be OOP programmers too.
I've always been frightened off OOP by the complicated development environments, this book takes the sting away from it by using a simple IDE so you can worry about using netbeans or eclipse later once you've grasped the language :)
-
There is another learning IDE that the same guys have built called Greenfoot (http://www.greenfoot.org). It's a nice environment and now comes with it's own book too (http://www.amazon.co.uk/Introduction-Programming-Greenfoot-Object-Oriented-Simulations/dp/0136037534/ref=sr_1_1?ie=UTF8&s=books&qid=1261559654&sr=8-1) (some of my source code is in that book).
Like the BlueJ environment, the Greenfoot one does a lot of work to make programming easier and simpler. Only this time it provides a visual world you can add objects too and then interact with. As a result it's more games related then BlueJ, but if you have Objects First then I don't think you'll find the Greenfoot book as useful.
-
I don't really want it for games to be honest mate.
After I have gone through this book I'll have to learn Eclipse because that's what they are using in work.
-
Yay! My first class...
I know it's simple..
/**
* Class to simulate central heating system control.
*
* @author Nick SImpson
* @version 24/12/09
*/
public class heater
{
//-------------------------------------------------------------------
// Fields.
//-------------------------------------------------------------------
private int temperature;
private int maxTemp;
private int minTemp;
private int increment;
//-------------------------------------------------------------------
// Constructors.
//-------------------------------------------------------------------
/**
* Constructor for objects of class heater
*/
public heater(int max, int min, int incr)
{
temperature = 15;
maxTemp = max;
minTemp = min;
increment = incr;
// Prevent negative temperature increments.
if (increment<0 ) {
increment = -increment;
}
}
//-------------------------------------------------------------------
// Methods.
//-------------------------------------------------------------------
/**
* Increase temperature by increment degrees mutator.
*/
public void warmer()
{
temperature += increment;
// Limit temperature to maximum.
if (temperature > maxTemp){
temperature=maxTemp;
}
}
/**
* Decrease temperature by increment degrees mutator.
*/
public void cooler()
{
temperature -= increment;
//Limit temperature to minimum.
if (temperature<minTemp) {
temperature=minTemp;
}
}
/**
* Return the temperature accessor.
*/
public int returnTemp()
{
return temperature;
}
}
-
welldone nick and keep going :0)
-
@Shocky:
Congratz for your first class. Nice to see that it is a heater (fits to
the current season). Most "first classes" are something like dog class
(private field name, public method bark()).
One minor cosmetic hint though, I would recommend to start
a class name with a capitalized letter (http://en.wikipedia.org/wiki/Naming_conventions_%28programming%29#Java).
Well, but thats minor stuff ... Keep it going!
-
One minor cosmetic hint though, I would recommend to start
a class name with a capitalized letter (http://en.wikipedia.org/wiki/Naming_conventions_%28programming%29#Java).
Seconded.
You could also take a look at JavaDoc (http://en.wikipedia.org/wiki/Javadoc) for generating the class documentation.
But keep it up.