[Solved] How to get a string from a function class?


You should probably get familiar with basic programing paradigms before proceeding with your app, especially method return value.

The method you’re looking for should be something like this:

public String cekberhasil() {
for (int i = 0; i < GRID_AREA; i++) 
    if(mIndexes[0] == 0 && mIndexes[1]==1 && mIndexes[2]==2)
        return "success";
    else
        return "";       

}

And than compare return value

if( mPuzzle15.cekberhasil().equals("success")){
//do something
}

2

solved How to get a string from a function class?