|
home—info—lects—labs—exams—hws
textbook—java.lang docs—java.util docs
We've seen examples that return answers:
Math.sqrt( 12+4 )
as well as examples which change some pixels on the screen, but don't return answers:
System.out.println( 12+4 );
We can use the answer from one method as the argument to another (!):
Math.sqrt( Math.sqrt( 12+4 ) )
System.out.println( Math.sqrt(12+4) );
Note that it does not make sense to write
Math.sqrt( System.out.println( 12+4 ) );. Why not?
(We'll talk more about this later.)
home—info—lects—labs—exams—hws
textbook—java.lang docs—java.util docs
©2009, Ian Barland, Radford University Last modified 2009.Jan.23 (Fri) |
Please mail any suggestions (incl. typos, broken links) to ibarlandradford.edu |