[Solved] class, interface or enum expected. I don’t how to correct [closed]


Ok, you have your class but you would import it into the main class for initializing your application or maybe import it into another class, you didn’t say clearly.

At this point, I believe you want to get the bonus variable. If it is, you must create a getBonus method to recover the variable. This is the good practice.

public Double getBonus() {
  return this.bonus;
}

Of course, you’d set a bonus value. Then, you can call the method.

System.out.println(kald.getBonus());

solved class, interface or enum expected. I don’t how to correct [closed]