I keep getting the same error in my java program so I can't run it. It says symbol errors. Can anyone help me?
I keep getting the same error in my java program so I can’t run it. It says symbol errors. Can anyone help me?
Im not sure what symbol errors mean but can someone help me out here.
import java.util.Scanner;
public class Diamond{
public static void main(String[] args){
int height;
height = 6;
for (int i=1; i<=height; i++){
for (int j=1; j<=1; j++)
system.out.print("*");
system.out.println();
Scanner scan = new Scanner(System.in);
int sides;
System.out.print("How many sides?");
sides = scan.nextInt();
Diamond d = new Diamond(6); // Constructor, for a Diamond object of side-length n
d.printOut(); // Prints the Diamond shape to the screen
}
}
}
Best answer:
I’m not sure if this will fix all your problems, but the first two lines in your for loops: system.out.print(“*”);
system.out.printlin();
need to be capitalized: System.out.print(“*”);
System.out.println();
Tags: anyone, cant, error, errors, getting, HELP, java, keep, program, same, says, Symbol
Under Forum

Leave a Comment for I keep getting the same error in my java program so I can't run it. It says symbol errors. Can anyone help me?
Trackback this post | Subscribe to the comments via RSS Feed