Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me this java question... 13) Array and loop: a) Given the following method: public static void newArray(long [] number) { number = new

Please help me this java question...

13) Array and loop:

a) Given the following method:

public static void newArray(long [] number) {

number = new long [25];

number [0] = (long) 85.0;

}

What is the output after the following code is run?

long [] numberTwo = new long [25];

numberTwo[0] = 13;

newArray(numberTwo);

System.out.println("numberTwo[0] = " + numberTwo[0]);

b) How many times will this loop execute its body? Remember that "zero," "infinity," and "unknown" are legal answers.

int max = 250;

while (max % 3 != 0){

System.out.println(Count down: + max);

max--;

}

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

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

More Books

Students also viewed these Databases questions