1、Chapter 2continuing,More Control Structures,Quiz #1,close your books and clear off your deskwrite your name in (pin yin and han zi), student number and Quiz # 1you will get a zero if you look at your neighbors areaif you continue to write, when I tell you to stop,Quiz,1.) The same Java program once
2、compiled can run on many different types of machines or Operating System. How?2.) Using for each loops calculate the total of all the numbers stored in this array:int nums 3.) What is the problem with the = = operator?,Quiz Answer,1.) The same Java program once compiled can run on many different typ
3、es of machines or Operating System. How?JVM (Java Virtual Machine) will translate the object code into code acceptable to the machine or OS,Quiz Answer,2.) Using for each loops calculate the total of all the numbers stored in this array: int nums for ( int arr : nums )for ( int i : arr )total += i;,Quiz Answer,3.) What is the problem with the = = operator?When used with reference variables, it will only check to see if they are “pointing” to the same object.it will not check to see if the objects are equal.,