Lecture Notes on 07 Sep 2011 Steps in Learning a Computer Language * Write the Hello World program * Characterset -ASCII & Unicode * Variables * Types - short, int long, float, double, char, boolean, byte * Operators - Arithmetic: + - * / % - Comparison: > >= < <= == != - Boolean: ! && || ^ * Statements * Conditionals * Loops * Methods * Arrays * Input / Output * Class // Program to compute the area of a circle import java.util.Scanner; public class Test { public static void main (String[] args) { // Create a Scanner object Scanner sc = new Scanner (System.in); // Prompt the user to enter the radius System.out.print ("Enter radius: "); // Read the user input double radius = sc.nextDouble(); // Compute the area double area = Math.PI * radius * radius; // Write out the result System.out.println ("Area = " + area); } }