Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ut i am able to change the value of static variable
- class Test
- {
- static int a =10;
- public static void main(String args[])
- {
- a=20;
- System.out.println("rest of the code...");
- Test1 t= new Test1();
- t.m();
- }
- }
- public class Test1 {
- void m ()
- {
- System.out.println(Test.a);
- }
- }
Add Comment
Please, Sign In to add comment