jeudi 30 juin 2016

Syntax Errors on Start of Method and in Array [duplicate]

This question already has an answer here:

import java.util.Random;
import java.util.Scanner;

public class BennettsWords 
{
    public static String input1;
    public static  Scanner input=new Scanner(System.in);

    public static String [] sen1 = new  String [9]
    sen1 [0]="Wanna gooo!!!";
    sen1 [1]="I'm very disapointed with you, I might have to throw you out of the window!";

    public static String SM1="Wanna gooo!!!";
    public static String SM2="I'm very disapointed with you, I might have to throw you out of the window!";
    public static String SM3="BiggThinggg";
    public static String SM4="Boy...Boyy";
    public static String SM5="Ohh..Joel With the Big Thingg";
    public static String SM6="Ohh..Sargis With the Big Thingg";
    public static String SM7="Ccccbooyy";
    public static String SM8="Aowowwowo";
    public static String SM9="Your Mamama last Night...awawawawaw";
    public static String SM10="Omagow";

    public static void main(String[]args)
    {
        System.out.println("What he gonna say(Type Hear It)");
    String input1= input.nextLine();
    if (input1.equals("Hear It")||input1.equals("Hear it")||input1.equals("hear it"))
    {
        Random statement= new Random();
        System.out.println();
    }
}
}

In lines 10,24 some Syntax error appears Line 10= Multiple markers at this line - Syntax error on token "sen1", delete this token - Syntax error on token ";", { expected after this token

Line 24= Multiple markers at this line - Syntax error on token ")", ; expected - Syntax error on token "(", ; expected

I checked this error in a post and it was said that this is a Eclipse bug. I am a beginner so I don't know if it is a bug or my program. I run Eclipse neon Please inform me and if it is a bug please tell me what to do Thank You

Aucun commentaire:

Enregistrer un commentaire