Print Page Print Page

CH4 – Composition Revisited

  1. Open DrJava and expand the Interactions pane.
  2. Add the following lines of code to the Interactions pane.
> double x = Math.exp(Math.log(10.0));
> x
10.000000000000002
  1. Type the following lines to the Interactions pane.
> double x = Math.pow(2.0, 10.0);
> x
1024.0