JavaLanguage Section Index
What is Project Coin (JSR 334)?
Project Coin refers to a number of small changes to the Java language that were included in JDK 7.
What is InvokeDynamic (JSR 292)?
New in Java 7, JSR 292 allows dynamic languages to run faster in the JVM than in previous JDK versions.
What are the new features in Java 7?
Here are the major language changes in JDK7.
How do I split a space or comma-separated list?
The split() method of String takes a regular expression. The pattern "[s,]+" should to the trick. It says the separator will be one or more white space characters or comma.
How can the following throw a NullPointerException?
How can the following throw a NullPointerException?
Integer i = ...;
int j = i;
What is a magic number?
Magic numbers are literal numeric constants, typically stuck in the middle of code with no obvious reason for existance. Instead of using magic numbers, they should be declared as constants (priva...more
I'm looking for better date-time handling classes. Where can I find it?
You're not alone here. JSR 310 is attempting to remedy this situation (http://www.jcp.org/en/jsr/detail?id=310).
In the meantime, you can try out Joda time (http://joda-time.sourceforge.net/), wh...more
Does Java work with Windows Vista?
Chet Haase at Sun claims "Java on Vista: Yes, it Works" at http://weblogs.java.net/blog/chet/archive/2006/10/java_on_vista_y.html. There is more said there than can be written here.more
What does Class<String> mean?
Class<String> is the generics way of writing String.class. It allows you to improve type safety.
What does Class<String> mean?
Class<String> is the generics way of writing String.class. It allows you to improve type safety.
What is the natural ordering of a Boolean? Does FALSE come first or second?
Boolean.FALSE < Boolean.TRUE
What version of J2SE must I use to deal with the changes US daylight savings time in 2007?
Java SE v1.3.1_18 (and later)
Java SE v1.4.2_11 (and later)
Java SE 5.0 u6 (and later)
Java SE 6 SE
My application is using the the classes from some jar file.
My application is using the the classes from some jar file. I have made my application as jar and when I run my jar file I am getting the error "java.lang.NoClassDefFoundError:". These classes are ...more
What's the difference between a transient and non-transient exception?
Subclasses of SQLException have two types, transient and non-transient.
Transient exceptions are those that when retried could succeed without changing anything.
Non-transient exceptions are tho...more
How can I find the dates of all the weekend days in a year?
How can I find the dates of all the weekend days in a year?