Why is this particular code .class error during compiling?

PrezCulprit :

My question is two fold; One is I receive a bunch of .class errors when trying to compile my program, most other questions I find say that a missing bracket is the reason but all my brackets are matched. Two what is a .class error in this particular format?

Code:

class Simple
{
    public static void main (String [] args)
    {
        boolean [] test1 = { false, true, true, true } ;
        boolean [] test2 = { true } ;
        boolean [] test3 = { true, true, true, true, false } ;

        fullOfBool(boolean[] test1);
        fullOfBool(boolean[] test2);
        fullOfBool(boolean[] test3);

    }

    static void fullOfBool(boolean[] a)
    {
        for (int i = 0; i < a.length; i++)
        {
            if (a[i] == true)
            {
                System.out.println("The first true is at position" + i);
                break;
            }
        }

        for (int i = a.length - 1; i >= 0; i--)
        {
            if (a[i] == true)
            {
                System.out.println("The last true is at position" + i);
                break;
            }
        }
    }
} 

The errors I am receiving:

Simple.java:12: error: '.class' expected
        fullOfBool(boolean[] test1);
                             ^
Simple.java:12: error: ';' expected
        fullOfBool(boolean[] test1);
                                  ^
Simple.java:13: error: '.class' expected
        fullOfBool(boolean[] test2);
                             ^
Simple.java:13: error: ';' expected
        fullOfBool(boolean[] test2);
                                  ^
Simple.java:14: error: '.class' expected
        fullOfBool(boolean[] test3);
                             ^
Simple.java:14: error: ';' expected
        fullOfBool(boolean[] test3);
nitowa :

These statements make no sense:

fullOfBool(boolean[] test1);
fullOfBool(boolean[] test2);
fullOfBool(boolean[] test3);

try with just

fullOfBool(test1);
fullOfBool(test2);
fullOfBool(test3);

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=93944&siteId=1