Opening Hours :7AM to 9PM
class LocalGlobal { int x; //Global Varaible void show() { int y=10;//Local Variable x=100; System.out.println("x value is "+x); System.out.println("y value is "+y); } void disp() { int z=20;//Local Variable x=200; System.out.println("x value is "+x); //System.out.println("y value is "+y); System.out.println("z value is "+z); } } class Main { public static void main(String args[]) { LocalGlobal d=new LocalGlobal(); d.show(); d.disp(); } }Output: