In a Java 7 multicatch block what is the type of the caught exception?

Yes, the type of ex is the most specific supertype of both CharacterCodingException and UnknownServiceException, which would be IOException. Edit: Straight from the horse’s mouth on http://cr.openjdk.java.net/~darcy/ProjectCoin/ProjectCoin-Documentation-v0.83.html#multi_catch: Informally, the lub (least upper bound) is the most specific supertype of the types in question.

Java 7 default locale

This is as designed. Java 7 has changed the way Locale.getDefault() works. A defect has been entered with Oracle, but they basically said this is As Designed. To sum up, you must modify the Display Language of the OS. Modifying the Region Format only is no longer sufficient. Read the bug report here: Locale.getDefault() returns … Read more

Comparison method violates its general contract! Java 7 only

see this: From http://www.oracle.com/technetwork/java/javase/compatibility-417013.html#source Area: API: Utilities Synopsis: Updated sort behavior for Arrays and Collections may throw an IllegalArgumentException Description: The sorting algorithm used by java.util.Arrays.sort and (indirectly) by java.util.Collections.sort has been replaced. The new sort implementation may throw an IllegalArgumentException if it detects a Comparable that violates the Comparable contract. The previous implementation silently … Read more

Does Android support JDK 6 or 7 [duplicate]

Originally Android development tools supported only jdk 6 features. But that was changed, first by Android Studio 0.3.2 in October 2013 see: http://tools.android.com/recent/androidstudio032released Support for language features like the diamond operator, multi-catch, try-with-resources, strings in switches, etc. When creating a new project, you can specify a source language level: Note that you can use all … Read more