






























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!































Computer Applications in Power Systems – Advance course EH Dr. Arshad Saleem Lecture material contribution from: John Lewis and William Loftus. Java Software Solutions, foundation of program design
Circumference is: 37. Area is: 113. class BasicMath { public static void main (String[] args) { final double PI = 3.14159; int radius = 6; double area, circum; circum = PI * radius * 2; area = PI * radius * radius; System.out.println("Circumference is: " + circum); System.out.println("Area is: " + area); try{System.in.read();} catch(Exception e){} }//method main }//class BasicMath
import java.io.*; class Echo { public static void main (String[] args) throws IOException { BufferedReader stdin = new BufferedReader (new InputStreamReader(System.in),1); String message; System.out.println ("Enter a line of text: "); message=stdin.readLine(); System.out.println ("You entered: "" + message + """); } }
condition false statement true
condition statement true false statement