Question: C. float f300 = new float[][3): D. float(1) 4-(1.0f, 2.of, 2.0f): 4. What's the result when the following program is executed? public class TestDataType public
C. float f300 = new float[][3): D. float(1) 4-(1.0f, 2.of, 2.0f): 4. What's the result when the following program is executed? public class TestDataType public static void main(String[] args) { int x = 1; double y - 1.8; boolean b - (x - y); System.out.println(b); A. true C. Compilation error B. false D. Exception during runtime 5. Suppose that you have a program with the following declarations and initialization: int outer - ; int inner - 0; What values will these variables have after the following code is executed? for (int i - 0; i y> 0 B.x-y &&y C.x=y D. (x = 0) (x = 0) 7. Suppose a definition of a class: class Base { protected int Method (int a, int b) { return a; Which of the following method can be defined within the child class of Base? A. public int a Method(int a, int b) {return a+b; } B. private int aMethod(int a, int b) { return a+b; } C. public short aMethodinta, int b) { return a+b; } D.static protected int a Method(int a, int b) { return a+b; }
Step by Step Solution
There are 3 Steps involved in it
Lets go through each of the questions Question 4 Question Whats the result when the following progra... View full answer
Get step-by-step solutions from verified subject matter experts
