    1  package experiment;
    2  
    3  /**
    4   *  Description of the Class
    5   *
    6   *@author    Chris Seguin
    7   */
    8  public class TryTest {
    9  	/**
   10  	 *  Main processing method for the TryTest object
   11  	 */
   12  	public void run() {
   13  		InputStream input = null;
   14  		if (this.equals("works")) {
   15  			System.out.println("Something is wrong");
   16  		}
   17  		else {
   18  			System.out.println("Normal operation");
   19  		}
   20  		if (input == null) {
   21  			System.out.println("Normal operation");
   22  		}
   23  		try {
   24  			StringBuffer buf = new StringBuffer("message");
   25  			input = new FileInputStream("c:\\temp\\test.txt");
   26  			input.write(buf.toString().getBytes());
   27  		}
   28  		catch (IOException ioe) {
   29  			ioe.printStackTrace();
   30  		}
   31  		finally {
   32  			try {
   33  				if (input != null) {
   34  					input.close();
   35  				}
   36  			}
   37  			catch (IOException ioe) {
   38  				System.out.println("Unable to close the file");
   39  			}
   40  		}
   41  	}
   42  }
   43  /**
   44   *  Description of the Class
   45   *
   46   *@author    Chris Seguin
   47   */
   48  public class LoadingProblem {
   49  
   50  
   51  	private int counter;
   52  	private static int initial;
   53  
   54  
   55  	/**
   56  	 *  Constructor for the LoadingProblem object
   57  	 */
   58  	public LoadingProblem() {
   59  		counter = LoadingProblem.initial;
   60  	}
   61  
   62  
   63  	/**
   64  	 *  Gets the Counter attribute of the LoadingProblem object
   65  	 *
   66  	 *@return    The Counter value
   67  	 */
   68  	public int getCounter() {
   69  		return counter;
   70  	}
   71  
   72  
   73  	/**
   74  	 *  Gets the Sqrt attribute of the LoadingProblem object
   75  	 *
   76  	 *@param  value  Description of Parameter
   77  	 *@return        The Sqrt value
   78  	 */
   79  	public native int getSqrt(float value);
   80  
   81  	static {
   82  		initial = 52;
   83  	}
   84  }
   85  /**
   86   *  Description of the Class
   87   *
   88   *@author    Chris Seguin
   89   */
   90  public class SingleLineComments {
   91  
   92  
   93  	/**
   94  	 *  Description of the Method
   95  	 */
   96  	public void method() {
   97  		//  This is a normal comment
   98  //		int d = 1;
   99  		//  That was commented out code
  100  	}
  101  }
