package pkg6.pkg2.addex2.encapsulation;
import java.util.Scanner;
public class Addex2Encapsulation {
public double bal = 100;
public double getBalance(double gbal) {
return gbal;
}
public void setBalance(double gbal) {
System.out.println("Enter you Deposit:");
Scanner scanner;
scanner = new Scanner(System.in);
gbal = scanner.nextDouble();
System.out.println(gbal);
gbal = bal;
}
public static void main(String[] args) {
Addex2Encapsulation balance = new Addex2Encapsulation();
balance.setBalance(gbal); // i ma having an error here. can u help
System.out.println(balance.bal);[/B]
}
}