View Full Document


Unformatted text preview:

Modifications to Java Since Version 1 0 Proposed Modifications to Java and Titanium Compatibility With Java Amir Kamil Titanium Group UC Berkeley July 1 2003 The Java language has been modified substantially since the original 1 0 version and additional modifications are planned in the future These changes unfortunately are not documented in a central location on Sun s website Therefore for the benefit of Java and Titanium developers the following is a compilation1 of the various changes to Java with overviews of each modification and the status of Titanium compatibility with each new feature 1 Modifications to Java Since 1 0 The Java language was changed substantially between versions 1 0 and 1 1 with the introduction of enclosed classes Other less significant features such as instance initiliazers and the assert keyword were also added in Java 1 1 and later versions 1 1 Lexical Changes Very few changes to the lexical structure of Java have been made since version 1 0 Two keywords have been added strictfp and assert 1 1 1 strictfp The strictfp keyword was introduced in Java 1 2 as a modifier It forces methods it modifies to adhere exactly to the IEEE 754 standard for all floating point operations It can also be applied to classes in which case all floating point operations in the class will be strictly IEEE 754 Individual variables cannot be declared strictfp 1 1 2 assert Until Java 1 4 the language contained no built in facilities for assertions prompting many programmers to write their own assertion methods Java 1 4 introduced assert as a keyword making it incompatible with previous code that used it as an identifier Two assert constructs were introduced both of which throw AssertionErrors when the assertion fails The first is assert boolean expr This construct throws an AssertionError if the given boolean expression evaluates to false The second construct is 1 The information contained in this document is accurate to my knowledge as of the date of its writing 1

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...

Join to view Modifications to Java and access 3M+ class-specific study document.

We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Modifications to Java and access 3M+ class-specific study document.


By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?