.Article {Padding: 1em; Background: White;
.ABSTRACT {Padding: 1em 1EX 1EM 2EM;
.author, .date {padding: 0.5ex 0 0 1em;
H1.TITLE, H2.MAJOR, H3.MINOR, H4.LISTING {
MARGIN: 1EX 2PX 1EX; Color: # 0066cc; font-family: Sans-Serif;
}
H1.TITLE {margin-left: 0;} h3.Listing {margin: 1ex 2px 0;
H4.Label {
Margin: 0 -1EX 1EX; Padding: 4px; Border: 1PX Solid # 0066cc;
"background: # 0066cc;
}
Div.sidebar {
Margin: 1.5EM 0.5EX 1EM; Padding: 0 1EX;
Border: 2px solid # 0066cc; -Moz-Border-Radius: 8px;
}
H4.Label: first-child {
-Moz-Border-Radius-Topleft: 4px; -Moz-Border-Radius-TOPRight: 4px;
.code {
Margin: 0 0 1EX; Padding: 1em; Background: #ccccccc; font: monospace;
Border: 1px solid #ccccccc; -moz-border-radius: 8px;
}
. Subtitle {font-size: 80%; padding-left: 1ex;}
DT {font-weight: bold;} Li {margin-top: 1ex; margin-bottom: 1ex;}
P {margin: 1em 0;}. AtrCeth a {text-decoration: underline;
. at. at: # 0000f;}. at: # 6699ff;
.Article A: hover {color: # ff00; background: # fff99;}
Joshua Bloch Tiger Poetry
"Ease of Development" is the main selling point of J2SE 1.5. To this end, this version joins seven new language features --enhanced for loop, autoboxing / auto-unboxing, varargs, static import, enumeration, metadata, and generics. Using these features, you can make the program written more concise, clearer, more uncomfortable, thereby simplifying the development process.
Joshua Bloch ("Effective Java", one of the main developers of J2SE 1.5) Effectively imitation William Blake (TIGER "in William Blake, a poem, wrote such a group of poems for these characteristics:
Tiger
Tiger, Tiger Burning BRIGHT
Like a get WHO Works All Night
What new-fangled bit or byte
COULD EASE THE HACKER's WEARY PLIGHT?
This first is always a variety of new language features that make developments make developments in Tiger.
ENHANCED for loop
While Iterators Have their buy
They Sometimes Strangle US Like Nooses
WITH ENHANCED-for's deadly ray
Iterator's Kept At Bay
This Skinding ENHANCED For Loop mechanism provides a simpler traversal array, Collection, and other methods that implement the Java.lang.Iitrable interface. Autoboxing / auto-unboxing
When from the collections INTS Are Drawn
Wrapper Classes Make Us Mourn
When Tiger Comes, We'll Shed No TEARS
We'll AutoBox Them in the EARS
This first single autoboxing mechanism / auto-unboxing provides a simpler integration of two sets of different types of systems (basic types, and reference types).
VARARGS
O Joyless Nights, o Joyless Days
Our Programs Cluttered with arrays
With varargs here, we needn't white;
We'll Simply Put the args inline
This first single VARARGS mechanism provides a simpler way to deliver a number of variable arguments.
STATIC IMPORT
And from the constant interface
WE Shall Inherit No Disgrace
With static import aturid
Our Joy Will Be Unqualified
This first single Static Import mechanism provides a simpler mechanism to access static members.
ENUMERATION
THE INT-ENUM WILL Soon Be gone
Like a foe we've knower too long.
WITH TYPE SAFE-ENUM'S MIGHTY POWER
Our Foe Will Bother US No More
This first single ENUMERATION mechanism provides a simpler way to define the type of "enumeration class".
Metadata
As for noble metadata
I'll Have to Sing ITS Praises Later
ITS Uses Are So Numerous
To Give Their Due, I'D Miss The Bus
This first single MetAdata mechanism provides a simpler mechanism for defining "Machine Readable Description Information".
Generics
To The Most Despised Collectes' Cast
We'll Bid A Fond Fondwell At Last
With generics' burning spot
The need for cast will disappear
This first is to use the Generics mechanism to avoid the steps of multi-mandatory types of steps. The Generics mechanism has some other usage, not mentioned here.
Complexity of various characteristics
The new seven language features in J2SE 1.5 is very complicated. Generally, Enhanced for loop, autoboxing / auto-unboxing, varialgs, and static import are relatively simple, and Enumeration, Metadata and Generics are more complicated.
No feature included
J2SE 1.5 has not joined all language features that have been invented to be invented -, for example, to assign the default value to the parameter, it is not included. Of course, if you just want to do this, you can consider replacement with overload.
related information
Gradually excavation enhanced for loop gradually excavation Autoboxing / Auto-Unboxing gradually excavated VARARGS gradually excavated Static Import
Reference