Need help finding the error in my code. Wherever there\'s a \"player.\" something netbeans shows an error saying \"cannot find symbol\". import java.util.Scanner; public class DicePlayer { private boolean player; private String name; private double cash; Scanner scnr=new Scanner(System.in); public void setName() { System.out.println(\"Enter the name of the player\ \"); name=scnr.next(); } public void setCash () { System.out.println(\"Give the amount on the hand\ \"); cash=scnr.nextDouble(); } public String getName() { return name; } public double getCash() { return cash; } public boolean addCash() { double add; System.out.println(\"Give the amount to add\ \"); add=scnr.nextInt(); if (add>0) { cash=cash+add; return true; } else return false; } public boolean subCash() { double sub; System.out.println(\"Give the amount to sub\ \"); sub=scnr.nextInt(); if (sub>0 && sub Solution I have spotted following errorsin your code: //private boolean player; // as you are not using this variable , so, i have commented it. private String name; private double cash; Scanner scnr=new Scanner(System.in); public void setName(String name) { System.out.println(\"Enter the name of the player\ \"); // name=scnr.next(); this.name=name; } public void setCash (int cash) { System.out.println(\"Give the amount on the hand\ \"); //cash=scnr.nextDouble(); this.cash=cash; } public String getName() { return name; } public double getCash() { return cash; } public boolean addCash(double a) { double add; System.out.println(\"Give the amount to add\ \"); //add=scnr.nextInt(); add=a; if (add>0) { cash=cash+add; return true; } else return false; } public boolean subCash(double s) { double sub=s; System.out.println(\"Give the amount to sub\ \"); // sub=scnr.nextInt(); if (sub>0 && sub.