Question: Question 18 // Write the explanation!!!!! What is the output of this code sequence? double [ ] [ ] a = {{ 100.4, 99.6, 48.2,

Question 18 // Write the explanation!!!!!

What is the output of this code sequence?

double [ ] [ ] a =

{{ 100.4, 99.6, 48.2, 65.8 }, { 100.5, 99.7, 48.2, 65.8 }};

double temp = a[0][1];

for ( int i = 1; i < a.length; i++ )

for ( int j = 1; j < a[i].length; j++ )

{

if ( a[i][j] > temp )

temp = a[i][j];

}

System.out.println( temp );

a.

99.6

b.

100.4

c.

99.7

d.

100.5

Question 27 // If the answer is a, Eplain why the answer is a not b; If the answer is b, explain why the answer is b not a; If the answer is both a and b, explain why.

Assuming the class B extends class A, then

a.

An object of class B is an object of class A

b.

An object of class A is an object of class B

c.

Both a and b

d.

None of the above

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!