views:

165

answers:

4

I need a cheat sheet for Java and started looking around, but could not find one that seemed "canonical" - which surprised me considering how widespread the language is. Could experienced Java coders please suggest a cheat sheet that is useful (organized so well you actually use it often) and complete (covers real-world daily usage) please?

By contrast, here's what I'd consider a canonical cheat sheet for Python: http://rgruet.free.fr/PQR26/PQR2.6.html

It is complete (syntax, types, statements, built-ins, common modules, idioms) and useful (well-organized: sectioned and hyperlinked; easy to search, and easy to explore).

Also, I have looked at the listing here already: http://devcheatsheet.com/tag/java/ and did not find a cheat sheet comparable to RGruet's Python cheat sheet above. The top listing in Google for "Java cheat sheet" is http://www.cs.princeton.edu/introcs/11cheatsheet/ which is fairly complete, but not organized to be useful. There's gotta' be something better out there!? BTW, it need not fit on 1 page. I'm aware of the Java API docs, but that's more what I'd expect a cheat sheet to link to, not be.

Update

Some SO members thought this question was subjective, but I think I explained my criteria to be fairly objective: completeness (content) and usefulness (presentation) are not hard to judge in this context. I've accepted one of the more useful answers, but remain surprised that Java doesn't have a canonical cheat-sheet.

+3  A: 

Here is a great one http://download.oracle.com/javase/1.5.0/docs/api/

These languages are big. You cant expect a cheat sheet to fit on a piece of paper

Sean
Its the best one, LOL. The python one, again, is unconfortable for me.
Imre L
No requirement of being 1 page long. :) I know of the API docs, I'd expect a cheat sheet to link to there, but it's not a cheat sheet itself.
limist
It's a smart-alecky answer... but also the correct one. Java doesn't use a boatload of invocation options and environmental variables the way that Python does. Among the information on that Python "cheat sheet" that actually IS applicable to Java, 99% is cross-language stuff that you probably already know. The main thing Java developers check on a day-in-day-out basis is the standard API Javadoc.
Steve Perkins
download.oracle.com :(
abhin4v
@Steve: thanks, not sure what you mean by Python's "boatload of invocation options and environmental variables" — generally things work fine by typing "python myprog.py" But in any case, the point of a cheat-sheet is to aid one's memory; most cheat-sheets presume the reader is already very comfortable with core concepts like control flow, reserved keywords, data structures, etc.
limist
+2  A: 

This Quick Reference looks pretty good if you're looking for a language reference. It's especially geared towards the user interface portion of the API.

For the complete API, however, I always use the Javadoc. I reference it constantly.

Erick Robertson
Thanks for the first link, but the pdf is fairly old (1999) and that format (no hyperlinks, no top-level links to subsections) is not what I'm hoping for.
limist
You'd be surprised how little of it has changed. Supplementing that one with the Javadoc API from your version of Java would be ideal.
Erick Robertson
@Erick: thanks again for the tip; I may just use parts of this in my own cheat-sheet.
limist
+2  A: 

This one didn't seem too bad.

http://mindprod.com/jgloss/jcheat.html

Mike
except for the My Little Pony colors...
Erick Robertson
Mindprod.com Java resources, by the way, are great.
Grodriguez
Thanks, that's closer to what I'm looking for - wish the colors were easier on the eyes, but the non-color design aspects/organization are decent.
limist
Accept it if it is provides the solution to your question.
Mike
Mindorid isnjustbanother hobby site, and it has it's problems and errors just like the rest of them. Don't use these, use them official specifications.
EJP
Mindprod is just another hobby site, and it has its problems like the rest of them. Don't use these: use the official specifications and Javadoc.
EJP
A: 

It's not really a cheat-sheet, but for me I setup a 'java' search keyword in Google Chrome to search over the javadoc, using site:<javadoc_domain_here>.

You could do the same but also add the domain for the Sun Java Tutorial and for several Java FAQ sites and you'd be OK.

Otherwise, StackOverflow is a pretty good cheat-sheet :)

haylem