您的位置:寻梦网首页编程乐园Java天地Core JavaJava Lecture Notes

Introduction

Content

Apply

Reflect

Extend

previous.gif
 (3087 bytes)

Untitled-1.GIF (357576 bytes)


Apply Index

Apply Page # 12

Exercise 7 – Addition expression

The program statements needed to carry out a simple addition are surprisingly complicated. Suggest why the Java programming language does not allow a pair of additions to be written simply:

2+2 3+3

rather than

System.out.println( "2+2 is" );
System.out.println( 2+2 );
System.out.println( "3+3 is" );
System.out.println( 3+3);

Back to Content

Back to top

basicline.gif (169 bytes)

RITSEC - Global Campus
Copyright ?1999 RITSEC- Middlesex University. All rights reserved.
webmaster@globalcampus.com.eg