Core Java Technology Section Index
Part of the OpenJDK project, NIO.2 adds new I/O capabilities designed to simplify Java application development.
Project Coin refers to a number of small changes to the Java language that were included in JDK 7.
New in Java 7, JSR 292 allows dynamic languages to run faster in the JVM than in previous JDK versions.
Here are the major language changes in JDK7.
The fork/join framework in Java 7 allows developers to take advantage of multiple processors.
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? Integer i = ...; int j = i;
A Deque is a double ended queue, allowing inserting and removing from both ends.
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
The klist command-line tool is for Kerberos ticket management. Specifically, it is used to list entries in the credential cache and key table.
The ktab command-line tool is for Kerberos ticket management. Specifically, it is used to help manage entires in the key table. Solaris users can also use the kadmin tool (that isn't part of the J...more
What purpose does the newSetFromMap() method offer if I can just create something like a HashSet instead of a HashMap?
The Set returned by newSetFromMap() functions with the same ordering and concurrency characteristics of the map it is based off of. Some Map implementations also have a related Set implement, so u...more
If you pass a Comparator that doesn't implement Serializable into a collection like a TreeMap, that collection will automatically be non-serializable. It is best to flag all Comparator implementat...more
Is there a way to read all the items out of an NIO Buffer into an array to pass onto JNI (or for some other purpose)?
The Buffer class has an array() method added in 1.6 that allows you to get the backing buffer in a single call. This can be passed on to native code or to some method that requires an array to wor...more
A BufferOverflowException happens when the target buffer is full and you try to put something into it. A BufferUnderflowException happens when the source buffer is empty and you try to get somethi...more