Question: Which of the options has a compile error given that f is an instance of the following class Foo? 1234567810f.imethod();Foo.smethod();System.out.println(Foo.s);System.out.println(f.s);System.out.println(f.i);System.out.println(Foo.i);f.smethod();publicclassfoo{publicinti;publicstaticints;publicvoidimethod(){}publicstaticvoidsmethod(){}}//classFoo
Which of the options has a compile error given that f is an instance of the following class Foo? 1234567810f.imethod();Foo.smethod();System.out.println(Foo.s);System.out.println(f.s);System.out.println(f.i);System.out.println(Foo.i);f.smethod();publicclassfoo{publicinti;publicstaticints;publicvoidimethod(){}publicstaticvoidsmethod(){}}//classFoo
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
