Which of the below is valid way to instantiate an array in java?
Anonymous Quiz
66%
int myArray [] = {1, 3, 5};
9%
int myArray [] [] = {1,2,3,4};
12%
int [] myArray = (5, 4, 3);
14%
int [] myArray = {“1”, “2”, “3”};
What type is (x+y)?
double x = 39.21;
float y = 2.1;
double x = 39.21;
float y = 2.1;
Anonymous Quiz
6%
int
22%
float
53%
double
19%
not compile
Code snippet
import java.util.ArrayList;
import java.util.List;
public class JavaSETest {
public static void main(String[] args) {
List<Integer> elements = new ArrayList<>();
elements.add(10);
int firstElmnt = elements.get(1);
System.out.println(firstElmnt);
} }
What is the result of the code snippet above?
Anonymous Quiz
20%
null
26%
10
12%
0
42%
An IndexOutOfBoundsException is thrown at runtime
Bytecode is in a file with which extension?
Anonymous Quiz
13%
.bytecode
11%
.bytes
40%
.class
10%
.exe
14%
.javac
13%
.java
In this channel you will:
🎯 receive TOP Java questions every day
🎯 acquire a solid foundation in Java
🎯 find clear explanations of the concepts you need to grasp under EACH question
🎯 achieve the high level of professional competency
🎯train yourself, refresh your knowledge, prepare for exam and a lot of others advantages
🎯 receive TOP Java questions every day
🎯 acquire a solid foundation in Java
🎯 find clear explanations of the concepts you need to grasp under EACH question
🎯 achieve the high level of professional competency
🎯train yourself, refresh your knowledge, prepare for exam and a lot of others advantages