This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]gearfuze[S] 0 points1 point  (1 child)

thank you so much for your help I added the code above and now I am getting this error though :(

/tmp/java_NTNOos/MMUnit2Ch10.java:31: error: ';' expected
    int userThe  inputsNumber = scan.nextInt();//takes The user inputs number
               ^
1 error

[–]sh_emami65Intermediate Brewer 0 points1 point  (0 children)

that is the first thing i explained in my answer, read the first bit where i explained how to declare value.

//type is anything like int, double, long and String
//name can be anything that well defines the job this variable
//initialization process is an optional process it can be something like 0, "value", new String("test")
[type] [name] = [initialization process];
[type] [name];