Question: java 6- 6 Computer Programming 14011101-4 public static void main(String[] args) { int[] array = {9,4,12,2,6,8,18}; System.out.print(array[i] + } for (int i= array.length-1; i
java
![java 6- 6 Computer Programming 14011101-4 public static void main(String[] args) {](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f5c664ee87e_14066f5c66461a83.jpg)
6- 6 Computer Programming 14011101-4 public static void main(String[] args) { int[] array = {9,4,12,2,6,8,18}; System.out.print(array[i] + " } for (int i= array.length-1; i > 0; i--) 11 ); a 18 8 6 2 12 4 b) 9 4 12 2 6 8 18 c) 18 8 6 2 12 4 9 d) None of the above 7- if ( 5 > 0) if (642==0) if(2185==0) System.out.println("positive"); else if (5==7) System.out.println("negative"); else System.out.println("zero"); a) positive b) negative c) zero d) nothing Q4: Write the result's value and the result's data type for each of the following java expressions: (3 marks) result's value result's Type a. Java Expression Int a =3, b=4, c=2; result = ! (6/a* (8.0* 2-b/c) >22); b. Int y=102, z=0, w=6; result =10.0* (y8=10/ (++z+w-4)-1); Int pos = "Umm AlQura University".indexOf(''); result = "Hello Java".charAt(pos+2)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
