What will be the output of the following program?
public class FoodItems {
public static void main(String s[]) {
Noodles eat = new Noodles();
eat.print();
Maggi mag = new Maggi();
mag.print();
System.out.println("~" + mag.sticks);
}
}
class Maggi {
private int spoon = 3;
protected int sticks = 4;
void print() {
System.out.print("~" + spoon);
}
}
class Noodles extends Maggi {
private int powder = 1;
protected int fire = 2;
void print() {
System.out.print(powder + "~" + fire + "~" + sticks);
}
}