Quiz 8 (Exercise for Chap. 14)

Some review questions from Horstmann's Big Java.
  1. What is a checked exception?

  2. Is NullPointerException checked or unchecked?


  3. If your method declares that it throws IOException then will it?


  4. When your program executes a throw statement, which statement is executed next?


  5. What happens if an exception does not have a matching catch clause?

  6. What can your program do with the exception object that a catch clause receives?

  7. Is the type of the exception object always the same as the type declared in the catch clause that catches it?

/*
   Ask the user for an integer and if you receive it print the square,
  if it is not an integer, then give the user a second chance, but not
  a third chance.  
 */
import javax.swing.JOptionPane ;

public class Quiz8
{
    public static void main(String[] args)
    {
	int tries = 0 ;
	while (_________________________
	    try {
		String input = JOptionPane.showInputDialog("Please enter integer") ;
                __________________________________________________
		
                ______________________________________________

                ______________________________________________
	    }	    
	    catch (___________________________________

                ________________________________________

                ________________________________________
	    }
	}
	
    }
}