Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started