Java examples for Object Oriented Design:Access Level
Create private instance members rather than public or protected.
class Player {/* w ww. ja v a 2s. c om*/ private String firstName = null; private String lastName = null; private String position = null; private int status = -1; public Player(){ } public Player(String position, int status){ this.position = position; this.status = status; } }