jFive
jFive it's a very simple Java project made by just few files, which only purpose is to offer some source files (with more documentation then coding) useful to experiment and/or test the features introduced by Java SE 1.5, also known as "Java 5" or "Tiger". The jFive application is aimed to be executed from the consolle (i.e. from the command prompt, shell or the IDE launch configuration).
Following components are shipped with the jFive project:
docs
directory listing the application's main featuresThe ANT build file can be ignored, since it's possible to compile the project using any IDE (i.e. the project does not contain any specific file settings for some existing IDE).
Main features
The project is divided into three sections:
The JavaTester class contains some examples reagarding the main features introduced with Java 5, which are:
for(int value : list)
enum
objectsMath.PI -> PI)
System.out.printf
)scanner
object)method(Object ... args)
The GenericTester class contains some example of usage of Generics:
<T extends CharSequence>
)<T extends A & B & C ... >
)<T extends Class<T>>
)Child<A, B>
extends Parent<A>
only if they share the same type)The WildcardsTester contains examples and comments regarding usage of Wildcards, and some final consideration about some advanced topics:
A<? extends B> arg
)A<?> arg
)A<? super B> arg
)All the material (JavaDoc and comments) is in english.
Download
JFive 1.0