Question: QUESTION 6 What will happen when you compile and run the following code? 1 public class Test{ 2 3 4 public static void compute(int i,

 QUESTION 6 What will happen when you compile and run the
following code? 1 public class Test{ 2 3 4 public static void
compute(int i, int i) { System.out.println("int version"); } 5 6 7 8
public void compute(int i, int i) { System.out.println("long version"): } 9 10

QUESTION 6 What will happen when you compile and run the following code? 1 public class Test{ 2 3 4 public static void compute(int i, int i) { System.out.println("int version"); } 5 6 7 8 public void compute(int i, int i) { System.out.println("long version"): } 9 10 11 12 public static void main(String args[]) { Test t = new Test(): compute(10, 5); } 13 14 15 } int Version O long Version Compilation Error Runtime Error QUESTION 7 What is a constructor? O another name for an instance variable o the return type of method o the method that creates an object, or instance of the class o the instantiation of an object QUESTION 8 What does it mean when a method is static? o it modifies or mutates an object o it applies to the entire class, not just one object or instance o it is private o it is overloaded QUESTION 9 means the method has no return value. Ovoid O static String concatenation o QUESTION 10 Which of the following is true about private access modifier ? o Variables, methods and constructors which are declared private can be accessed only by the members of the same class Variables, methods and constructors which are declared private can be accessed by any class lying in same package Variables, methods and constructors which are declared private in the superclass can be accessed only by its child class None of the above QUESTION 12 What is an object? o Instance of an object o Instance of a method Instance of a class o Instance of constructor QUESTION 13 Which constructor has no parameters? Default Constructor o Null Constructor Parametric constructor O Copy Constructor QUESTION 14 In oops public, private & protected are Classes O Access Modifiers o Interfaces O Method Signature

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!