I dont understand whats going on Its hard for me to read whats happening and what the output will be. public class Weird { public static void main(String[] args) { int number = 8; halfTheFun(11);...








I dont understand whats going on Its hard for me to read whats happening and what the output will be.


public class Weird {
public static void main(String[] args) {
int number = 8;
halfTheFun(11);
halfTheFun(2 - 3 + 2 * 8);
halfTheFun(number);
System.out.println("number = " + number);
}


public static void halfTheFun(int number) {
number = number / 2;
for (int count = 1; count <= number;="" count++)="">
System.out.print(count + " ");
}
System.out.println();
}
}



1 2 3 4 5
1 2 3 4 5 6 7
1 2 3 4
number = 8




















Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here