0
What is the output of this code? class Temp { public int num = 2; public Temp() { num++;} ~Temp() { num++; } } static void
when the object is created the constructor increments the num value by 1 and when the program ends destructors is called which again increments the value by one .So how the answer might be 3?
1 Respuesta