Answer:
Explanation:
Each of the following println statements will print the following values
ystem.out.println(floozy); // Problem 1: 97.4
System.out.println(theObj.gravy); //Problem 2: 107.43
System.out.println(xray[2]); //Problem 3: 100
System.out.println(s); //Problem 4: Hello
This is because out of all of the variables that the myMethod gives a value to, the only variable that is being saved back to the global variable in the main method is a[2]. The other variables are being saved as instance variables and not being returned. Therefore, when the println statements are called they target the local variables in the main method.
Answer:
Here is my answer in Javascript
num = 0; // Use to calcate the even numbers
loop = 10; // Use for the highest even number that will be calcated for
index = loop/2; // Calcate the size of the array based upon how many loops their
let arr = [index]; //Create array to store the even numbers
let i = 0; // Use to keep track of which on what number in the while loop we are on
let total = 0; //Used to add up all of the even numbers
let mean = 0; //Used to calcate the mean of all even numbers
do {
i = i + 1; //Keep track of what loop we are on
num = num + 2; //Used to calcate the even number
arr.push(num); //Push the num into a array
total = total + arr[i]; //Calcate the total of the array
mean = total / i; //Calcate the mean
}
while (num != loop);
//Output the result
console.log(mean);
Stream Txt blue hour!!!&$&$&$&&