Name:___________________________________
In this homework you are going to create a Java program that has answers to the questions below. Turn in a printout of a file named HW1.java
and also e-mail me the file as an attachment with a subject heading of HW1
. Do this
before the start of class on Thursday.
You are also going to turn in this homework sheet with answers written in the space provided.
So just to be clear here is what yo uturn in:
HW1.java
HW1.java
as an attachment (do not send me the
HW1.class
file)Fix_Me_Up_Because_I_Have_Problems.java
HW1.java
and execute
the statements. Save this file on your P: drive in your CS140 folder.
StdOut.println(3+2);
int x = 3; StdOut.println("The result is " + x);
What does the code below do?
String firstName = "Harry"; StdOut.println(firstName);
What does the code below do?
String lastName = "Potter"; StdOut.println(firstName + lastName);
In this context what does the + operator mean?
StdOut.println(3 >= 2);
HW1.java
file.
double lunchPrice = 5.25;
T:\Harcourt\Fall2008\CS140\Fix_Me_Up_Because_I_Have_Problems.javato your CS140 folder on your P: drive and fix all of the errors in the program so that it properly reads the value of the radius of a circle and prints the area of the circle to the console pane. Turn in a printout of the fixed program.