For the given code below, which lines are valid (will compil…
For the given code below, which lines are valid (will compile and run)? Assume each line is run independently. public class Foo { private static int number; private int jar; public static double fuzz() { return 0.0; } public int flop() { return 0; } public static void main(String[] args) { Foo obj = new Foo(); 1 obj.fuzz(); 2 obj.flop(); 3 Foo.fuzz(); 4 Foo.flop(); 5 System.out.println(obj.number); 6 System.out.println(obj.jar); 7 System.out.println(Foo.number); 8 System.out.println(Foo.jar); } } 1 : [1] 2 : [2] 3 : [3] 4 : [4] 5 : [5] 6 : [6] 7 : [7] 8 : [8]
Read Details