03-10-2010, 01:32 AM
Hello! I have been trying to wrap my head around Java for some time now. Maybe the reason for the amount of time it has taken me is because I am doing it on a part time basis. That said, I would like to know if there is a guide, link or chart that can help me navigate the vast API and find classes based upon what one is trying to accomplish? Thanks in advance for your help and patience.
03-11-2010, 04:24 PM
Well, it really does depend on what you're doing. I'd say about 90% of what you'll use on a daily basis has its roots in the STL from C++. One thing that I'd recommend is downloading a good IDE which has some inline documentation for the classes. Netbeans is one such IDE. Some things that I use often in Java are:
Runnable interface or Thread - for multiprocessing and threading. You just have to override run and it does what you want it to do.
ArrayList, LinkedList, SortedSet - templated classes, ArrayList is a dynamic array, LinkedList is a doubly linked list, and SortedSet allows you to remove duplicates pretty simply.
Scanner, PrintWriter, BufferedReader - All used for either file i/o, keyboard i/o, or stream i/o.
Swing or AWT - both are ways of making your program have a user interface which isn't console.
In any case, I have about 4 java books, and they work pretty well as a reference. One that I've found quite useful for basic things has been Absolute Java by Walter Savitch. Yes, it's a text book, but they do show you a lot of useful things in there. The website has some powerpoint presentations in the student side, which seem to be written in terms of explaining a lot of the code. http://wps.aw.com/aw_savitch_absjava_2s/
Otherwise, google a class and you'll more than likely find a couple of really good examples of how to use it, when to use it, and why you're using it. For example, graphics2d yields a good tutorial directly from java's website on how to render charts with graphics2d http://java.sun.com/docs/books/tutorial/2d/
Hope that starts you off in the right direction. :)
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.