Computer Science, asked by veenamukkundi123, 2 months ago

class Demo {
public int value = 20;
Demo() {
value = 40;
}
3
public class Tester {
public static void main(String args[]) {
Demo demo new Demo ();
System.out.println(demo.value):
}}
output?​

Answers

Answered by srakebr
0

Answer:

40

Explanation:

The constructor initializes the value to 40 when you create the object.

Similar questions