Core Java Technology Section Index | Page 2
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
What's wrong with the following statement: System.out.printf(object.toString())?
The first argument to the printf method is the formatting string. While this will typically display the string you want, if it includes something like a % in it, it won't and will try to interpret...more
Access Denied error in frames.When I try to access a child frame from parent frame I get "Access Denied Error".
Access Denied error in frames
When I try to access a child frame from parent frame I get "Access Denied Error". I know the reason is because I am trying to access the frame in a different domain. I...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
How can I detect if a duplicate is added to a Set?
The add() method returns a boolean. If the set did not previously contain the element, true is returned. If the set previoulsy did contain the element, false is returned. Of course, you can also c...more
How do I create a multimap in Java?
Typically a Map maps a key to a single value. To have a multimap, the values of a Map should be a List instead. Thus there can be multiple values in the List associated with a single key.more
Is it better to use a for-each loop or an Iterator with a collection?
It depends on what you need to do. The remove() method of an Iterator is the safe way to remove elements from an underlying collection. You can't safely remove elements with a for-each loop. For j...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 a multimap?
A multimap is a map where a single key can map to multiple values.
What is a multimap?
A multimap is a map where a single key can map to multiple values. (And a value can be associated with multiple keys.)
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
Why do I keep getting an UnsupportedOperationException thrown when I try some collection operations?
Several methods of the collection interfaces are considered optional. If an unsupported operation is called, that is when you'll see the UnsupportedOperationException thrown. The javadoc for a col...more
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