What is the output of the following program? import java.io.*; class sample2 { int a; static int b; sample2() { a=0; b=10; } sample2(int a,int b) { this.a=a; this.b=b; } public void test() { System.out.print(a); System.out.print(b); } public static void main(String args[]) {sample2 ob=new sample2(); System.out.print(ob.a); System.out.print(ob.b); sample2 ob1=new sample2(4,5); System.out.print(ob1.a); System.out.print(ob1.b); test(); } }
Reveal answer
Fill a bubble to check yourself