What will be the output of the following code segment?class Number{int a;public static void main(String ar[]){ a=10;int b=20;a=a+b;b=a-b;a=a-b;System.out.println(a = +a);System.out.println(b = +b);}}
Non-static variable cannot be referenced from a static context. a is a non-static variable, it cannot be referenced from within main() which is static.