Declare a package and a public class with a private field
Declare a package and a public class with a private field
Answer
package bank; public class Account { private double balance; public double getBalance() { return balance; } }
`package` is the first statement; the class is `public` (its published API) but the field is `private`, reached only through the public `getBalance()` accessor.