I got a couple of java homeworks i need help with, like helping me spot the error with the code.
Whats the error here?
Any error here?
Code:
public class SphereVolume { public static void main (String[] args); System.out.println ("Volume: " + volume + " cubic cm"); radius = scn.nextDouble(); final double PI = 3.14159; volume = PI * radius * radius * radius ; System.out.print ("Enter radius(cm) of circle: "); Scanner scn = new Scanner(System.in); int radius; int volume; }
Code:
import java.util.Scanner; public class Face { public static void main(String[] args) { // declare variables String Peter; Scanner scn = new Scanner(System.in); System.out.print("Enter your name : "); Peter = scn.nextString(); System.out.println(" //////////"); System.out.println(" | o o |"); System.out.println("(| ^ |)"); System.out.println(" | \\_/ |"); System.out.println(" --------- "); System.out.println("Hello, I am Peter! How are you?"); } }
Last edited by Ayumiz (2007-05-10 06:26:21)