Question: Please look through the items below: Line #01: public class HelloWorld { Line #02: Line #03: public static void main(String[] args) { Line #04: Line

Please look through the items below:
Line #01: public class HelloWorld { Line #02: Line #03: public static void main(String[] args) { Line #04: Line #05: int[] intVals = new int[7]; Line #06: Line #07: for (int i = 0; i < intVals.length; i++) { Line #08: Line #09: intVals[i] = (int) Math.pow(2, 7); Line #10: Line #11: if (intVals[i] % 3 == 0) Line #12: Line #13: System.out.println(intVals[i] + Line #14: " is a multiple of 3"); Line #15: } Line #16: Line #17: } Line #18: Line #19: }

1.) Indicate each array name, including the line number(s) it appeared, from the code above. (2 array name)

2.) Indicate each numerical or string literal, including its line number(s), from the code above. ( 7 numerical or string literal)

3.)

With the following variables declared and initialized...

double dVar1 = 25.0, dVar2 = 2.5; int iVar1 = 15, iVar2 = 30; String s1 = "hi", s2 = "there";

...show what is printed for at least 5 of the 6 following statements:

a.) System.out.println( dVar1 / dVar2 );

b.) System.out.println( (int) (iVar2 / dVar2) );

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!