Biology Forums - Study Force

Science-Related Homework Help Computer Studies Topic started by: barmour44 on May 5, 2020



Title: What is the output of the following code?public class Test { public static void main(String[] args) ...
Post by: barmour44 on May 5, 2020
What is the output of the following code?

public class Test {
public static void main(String[] args) {
int[] x = {120, 200, 016};
for (int i = 0; i < x.length; i++)
System.out.print(x[i] + " ");
}
}


▸ 120 200 14

▸ 120 200 16

▸ 120 200 20

▸ 016 is a compile error. It should be written as 16.


Title: What is the output of the following code?public class Test { public static void main(String[] args) ...
Post by: Kaajalp on May 5, 2020
Content hidden