Errata

This page is used to list and correct known errors in The Awesome Power of PowerJ. We apologize for any inconvenience.


Page 17

The code should read as follows:

class button { beginning of button block 
    public static void main () 
    { // beginning of main block 
    int x;

    ..... 

    } //end of main block 
    public void method () 
    { // beginning of method block 
    char y;

    ... 

    } // end of method block 
} // end of button block 


Pages 22 and 23

The line

    x = a[i] 

should read:

    x = a[i];


The line

    import java.awt.graphics; 

should read

    import java.awt.Graphics; 


The lines that read

    graphics g = new graphics; 

should read

    Graphics g = getGraphics(); 

and

    Graphics g1 = getGraphics();


Page 174

The code

    mdlg.create();

should read

    try {
          mdlg.create();
         }
        catch (java.lang.Exception e) {
        // error trapping code goes here

        }