/* * Lab 2 - Debugging Exercise * * name: * email: * * Thie is the corrected version. The commnents * indicate the errors which were fixed. * */ public class Debugging { // ^lower case P // ^class name shoud match file name public static void main(String[] args) { // ^keyword static is required /* * The following code segment is intended to calculate * the area of a triangle. */ double base = 3.5; // ^should be double int height = 2; System.out.println("Running Debugging.java\n"); // ^missing semi colon at end of statement // ^System.out.println - not print double area = height*base/2; // no parens needed, changes order of operations System.out.println("Area is: " + area); // ^Need to use the + // ^System.out.println - not print } // main // ^need closing brace for main } // Debugging