java - assign a enum variable -


i have problem code want assign simple enum variable , eclipse give me error "empty cannot resolved or not field"

here code have enum class seed below :

public enum seed {  // save "seed.java" empty, cross, nought } 

and have cell class inside want use seed class :

public class cell { // package access seed content; // content of cell (seed.empty, seed.cross, or seed.nought) int row, col; // row , column of cell  /** constructor initialize cell specified row , col */ public cell(int row, int col) {   this.row = row;   this.col = col;   clear(); // clear content }  /** clear cell's content empty */ public void clear() {   content = seed.empty;//**error** empty cannot resolved or not field } } 

what's wrong ?

save project , build , error disappear


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -