Objects by Design Forums Here you can view your subscribed threads, work with private messages and edit your profile and preferences Registration is free! Calendar Find other members Frequently Asked Questions Search Home  
Objects by Design Forums : Powered by vBulletin version 2.3.5 Objects by Design Forums > Main Forums > Object News > new java language features
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
wellington
Member

Registered: Jun 2001
Location:
Posts: 37

new java language features

At JavaOne, James Gosling announced that two new features will soon be added to the Java language: assertions and generics.

These features are both significant and signal a trend that Sun is listening closely to the suggestions input to the Java Community Process (JCP). The suggestions are called Java Specification Requests (JSR).

Assertions
JSR-41 calls for the addition of a new keyword, assert, to be added to the language in the JDK 1.4 timeframe. Similar to C++, this feature can be used to check that boundary conditions are satisfied during program execution. It seems that the authors also had Eiffel in mind with this feature since it is close to pre-conditions. However, the JSR warns against using this feature for argument checking because this should be part of a method's contract and not subject to disablement like assertions.

For more details, see the following web page: A Simple Assertion Facility.

Generics
Generics should be familiar to former C++ programmers since they behave very similar to templates. This feature is intended to remove the need to cast many of the results of methods in the Collection classes. For instance, when getting an object from a List, you have to cast the object to its appropriate type before using it. Generics remove the need to cast while maintaining type safety. See
JSR-14 and a description of GJ, a proposal for this JSR, for more information. This feature isn't expected until JDK 1.5...


Anyone for multiple inheritance?

Last edited by wellington on 06-08-2001 at 04:19 AM

Report this post to a moderator | IP: Logged

Old Post 06-08-2001 04:17 AM
wellington is offline Click Here to See the Profile for wellington Click here to Send wellington a Private Message Visit wellington's homepage! Find more posts by wellington Add wellington to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 12:47 PM. Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 

< Contact Us - Objects by Design >

Powered by: vBulletin Version 2.3.5
Copyright ©2000 - 2018, Jelsoft Enterprises Limited.
Copyright 1999-2005, Objects by Design, Inc.