CS 101 - 9/1/11 Chpt 2. Java Langauge & DrJava Development Environment Lab on Friday: Set up DrJava Set up on a home/personal computer java file set-up Source Code Files: .java Java Byte Code File: .class DrJava Version Control File: .java~ Simple Output Statement: System.out.println ("Words to be output"); Comments - Information ignored by the compiler - added to help the humans looking at the program // - end of line comment /* */ - Block Comment /** */ - Special Block Comment for JavaDocs Java Variables - names that are associated with memory storage, the compiler associates a name with a "numbered mailbox" in the computer's memory types of value - speficies the encoding structure of the data int - positive or negative whole number (integer) double - floating point numbers (real numbers) char - character String - words, a group of characters boolean - true or false Variable declaration syntax int number1; names must begin with a letter and then can contain letters, digits or underscores double areaOfACircle; // good style double area_of_a_circle;// good style double areaofacircle; // bad style Assignment statement; number1 = 7; int number2, number3; number2 = number1; variable = expression ; An Assignment stores the result of the expression into the variable number3 = number1 + 5; int counter = 0; number3 = 5 + (7 * 2);