Given this  sample code import java.util.ArrayList;import blackjack.model.items.Card;public class BlackJackPlayer extends Player {    private double bet;    private Hand hand01 = new Hand();    private Hand hand02 = new Hand();    public void addCardToHand01(Card c) {        hand01.addCard(c);    }    public void addCardToHand02(Card c) {        hand02.addCard(c);    }    public void bustHand01() {        hand01.setBust(true);    }    public void bustHand02() {        hand02.setBust(true);    }    public void standHand01() {        hand01.setStand(true);    }    public void standHand02() {        hand02.setStand(true);    }    public boolean isHand01Bust() {        return hand01.isBust();    }    public boolean isHand02Bust() {        return hand02.isBust();    }    public boolean isHand01Standing() {        return hand01.isStanding();    }    public boolean isHand02Standing() {        return hand02.isStanding();    }    public int  getHand01Score(){ return hand01.getCardScore(); }    public int  getHand02Score(){ return hand02.getCardScore(); }}Is this considered as a repetitive code? providing that each method is operating a seperate field but doing the same implementation ? Note that hand01 and hand02 should be distinct.if this is considered as repetitive code, how would I address this? providing that each hand is a seperate entity 
Distinguishing repetitive code with the same implementation
java;design patterns;code quality;source code;readability
Your mixing the game code with the player class. You should have a class for the player and one for the game(BlackJack). You need to start with something like this:public class Player {    private double bet;    private string name;    public Hand hand = new Hand();    public Player(string name)    {         this.name = name'    }    public Hand getHand(){        return hand;    }}public class BlackJack{     private List<Player> players = new ArrayList<Player>(); ;     public BlackJack(Player player1, Player player2)     {         players.add(player1);         players.add(player2);     }     public void bustHand(int playerNum) throws IndexOutOfBoundsException      {         players.get(playerNum).getHand().setBust(true);      }     }I am coding on the spot so it will not working 100% but should give you an idea