Learn Java in Minutes
learnxinyminutes.com
learnxinyminutes.com
The language has not proved to be too disturbing, happily, but I'm finding the tooling and ecosystem to be rather arcane and difficult to get a grip on at first. Build tools, a choice of JVMs and JDKs, "enterprise" this or that.. it seems all the stuff around the language is the real minefield than the relatively simplistic language itself.
It ain't J2EE 1.4 days any more (thank fuck).
The only thing I've done involving XML recently was setting tomcat 7 to serve a war file from the root site and that took about 2 minutes to work out.
Sam can't teach you to become an expert in 24 hours, but you can get a better knowledge if you come from another language / have seen Java before.
The point is that for learning it is very important to
1) Get a basic overview of terminology and a general feel for the domain (traditionally you pick up three or so books on the topic, browse through them and note similar/repeatet patterns on a very high level)...then you can break down the learning into subcomponents
2) Find a way to get started and just do it
Creating your own checklists, flash cards, high level presentation on the topic are great starting points and usually step 0 before practice, practice, practice.
This looks like an excellent first step for anyone that wants to start with JAVA.
I especially like pages that map the features of one programming language to another (that I already know). The recent AlloyUI post was an example comparing it to jQuery and YUI: http://alloyui.com/rosetta-stone/
And also see Rosetta Code http://rosettacode.org/wiki/Rosetta_Code
[1]http://jashkenas.github.io/docco/ [2] http://documentcloud.github.io/underscore/docs/underscore.ht...
"" + 123;- Do experienced java programming concatenate a bunch of strings together, or is there a format method? -Is anyone actually using Arraylist over Generics?
Also, is including 'switch' worth the screen real estate?
Yeah, I've seen this a lot. IIRC, String concatenations with the + operator are compiled to use a StringBuffer for efficiency. There is also a static method String.format that works with C-like format strings.
> Is anyone actually using Arraylist over Generics?
I'm not sure exactly what you mean by this. The following is pretty standard Java, if you want a list of Strings.
List<String> list = new ArrayList<String>();
The following gives you a list of Objects (the base type for all objects in Java): List list = new ArrayList();
If you put Strings into this list, then they come out as Objects. You'll have to cast to use them as Strings or the compiler complains.If you just want to append strings, use StringBuilder(not any different from C#). If you want to format strings, use String.format(analogous to C# string.Format)
> Is anyone actually using Arraylist over Generics?
Umm. ArrayList is itself generic.
ArrayList<String> names = new ArrayList<String>();String.format("The value: %s", theValue);
http://docs.oracle.com/javase/6/docs/api/java/lang/String.ht..., java.lang.Object...)
// Import all "sub-packages"
import java.lang.Math.*;
Nope, you don't import all subpackages with this, you import all the static methods defined in the java.lang.Math class import static java.lang.Math.*;
The current version would just import all the classes defined in package java.lang.Math (which does not exist, but java.math does)."I decided I didn't want to spend more than 20 hours on this exercise of learning Java, learning the IDE I was using, and producing a Lisp interpreter."
It has to be declared, defined, initialized, incremented, kept track of by the person reading the source.