What is output of following code package r4r.co.in.core.java; public class HelloWorld { static int i = 0; public static void main(String args[]) { System.out.println(i); HelloWorld h=new HelloWorld(); h.display(); } void display(){ int i=0; i=90; System.out.println(i); } }

What is output of following code package r4r.co.in.core.java; public class HelloWorld { static int i = 0; public static void main(String args[]) { System.out.println(i); HelloWorld h=new HelloWorld(); h.display(); } void display(){ int i=0; i=90; System.out.println(i); } }

Output of the program :

  0
  90

By:Jalees
Date:2016-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related Java Subjective Links

Java Subjective interview questions and answers for experienced and fresher