Accessing public method of another class -


basically, i'm trying call method in class, i'm running errors.

here code:

public class ocean {     private static int gridwidth, gridheight;     private int safecount;     private boolean shipsafe;     private static ship[] ships;     private static int[][] grids;  public ocean(int a, int b, int c) {     grids = new int[a][b];     ships = new ship[c];     for(int = 0; < c; i++)     {         ships[i] = ship();     }     gridwidth = a;     gridheight = b; } 

i cannot access public ship class, , error appears in ships[i] = ship();
i've tried redefining it, adding constructor.

change line ships[i] = new ship();


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -