www.digitalmars.com         C & C++   DMDScript  

D - OT: Java 1.5 language enhancements

reply "Ben Hinkle" <bhinkle4 juno.com> writes:
slashdot has an article about the Java 1.5 beta. I thought I'd post some of
the language enhancements since they'll seem very familiar:

Autoboxing/Unboxing (isn't automatic in D but is simple)
Enhanced for Loop (foreach)
Generics

Static Import (not sure what this is)
Typesafe enums
varargs

see http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html#lang

Also the collections framework has been updated for 1.5:
http://java.sun.com/j2se/1.5.0/docs/guide/collections/index.html
Feb 05 2004
parent Damon Gray <dontbotherasking go.away.mr.bad.spammer.net> writes:
Static Import is where you would import a classes constants only:

import static java.awt.BorderLayout.*;

  getContentPane().add(new JPanel(), CENTER);

Lets you use CENTER instead of BorderLayout.CENTER.

This link is a good overview of what is new:

http://java.sun.com/developer/technicalArticles/releases/j2se15/

Ben Hinkle wrote:
 slashdot has an article about the Java 1.5 beta. I thought I'd post some of
 the language enhancements since they'll seem very familiar:
 
 Autoboxing/Unboxing (isn't automatic in D but is simple)
 Enhanced for Loop (foreach)
 Generics

 Static Import (not sure what this is)
 Typesafe enums
 varargs
 
 see http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html#lang
 
 Also the collections framework has been updated for 1.5:
 http://java.sun.com/j2se/1.5.0/docs/guide/collections/index.html
 
 
 
 
 
Feb 05 2004