Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions