下列定义类的格式,和创建对象格式正确的是()
A. public class Cell{ private int row; int col; public void getCellInfo(){System.out.println(row+":"+col); }}
B. 创建对象的格式:Cell c=new Cell();
C. public class Cell(){ private int row; int col; public void getCellInfo(){System.out.println(row+":"+col); }}
D. 创建对象的格式:Cell c=new Cell;