- 1
How to work program execution.!!
Class Example { Int x; Void m1(){ X=50; } Void m2(){ System.out.println(); } } Class Test{ public static void main(String[] args){ Example e1=new Example (); System.out.println(e1.x); e1.m2(); e1.x=30; System.out.println(e1.x); e1.m2(); e1.m1(); System.out.println(e1.x); e1.m2(); } }
3 Answers
+ 2
Sachin Honde Patil can you please tell, what is your problem? Did you get any error or you have another problem?
+ 2
Hey! You can check it yourself in the code playground
0
in this program x value is change or not.!!