I looked up some Java problems and made a code for one but it keeps giving the same error on the public classes
import java.util.Scanner;
public class NumbersDemo
[{
public static void main (String args[])
{
int a = 5;
int b = 7;
}
public static void displayNumberPlus10(a) {
System.out.println(a+10);
}
public static void displayNumberPlus10(b) {
System.out.println(b+10);
}
public static void displayNumberPlus100(a) {
System.out.println(a+100);
}
public static void displayNumberPlus100(b) {
System.out.println(b+100);
}
public static void displayNumberPlus1000(a) {
System.out.println(a+1000);
}
public static void displayNumberPlus1000(b) {
System.out.println(b+1000);
}
public static void displayTwiceTheNumber(a) {
System.out.println(a*2);
}
public static void displayTwiceTheNumber(b) {
System.out.println(b*2);
}
}]
It keeps giving me this error and I cant seem to fix it
----jGRASP exec: javac -g NumbersDemo.java
NumbersDemo.java:9: error: <identifier> expected
public static void displayNumberPlus10(a) {
^
NumbersDemo.java:12: error: <identifier> expected
public static void displayNumberPlus10(b) {
^
NumbersDemo.java:15: error: <identifier> expected
public static void displayNumberPlus100(a) {
^
NumbersDemo.java:18: error: <identifier> expected
public static void displayNumberPlus100(b) {
^
NumbersDemo.java:21: error: <identifier> expected
public static void displayNumberPlus1000(a) {
^
NumbersDemo.java:24: error: <identifier> expected
public static void displayNumberPlus1000(b) {
^
NumbersDemo.java:27: error: <identifier> expected
public static void displayTwiceTheNumber(a) {
^
NumbersDemo.java:30: error: <identifier> expected
public static void displayTwiceTheNumber(b) {
^
8 errors
----jGRASP wedge2: exit code for process is 1.
----jGRASP: operation complete.
Please help