Question: private String occasion: public String toString() { System.out.println(Occasion:+occasion); } What is the error of this code?
private String occasion: public String toString() { System.out.println("Occasion:"+occasion); } What is the error of this code?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
