Select a correct way to declare an array in Java
var myArr
int[] myArr
$myArr
[]int myArr
No tests found
Java doesn't allow to use different primitive data types within the same array. True or false?
true
false
How to insert multi-line comments in Java code?
/* comment */
-- comment
<!-- comment -->
// comment
What will the following code output to the console?
int a = 5; int A = 10; System.out.println(a);
5
10
15
throw an error
int a = 1; int b = 10; System.out.print(a == b);
1
int x = 20; int y = x % 6; System.out.print(y);
2
3
6
20
The x -= y is the same as:
x -= y
y = x - x
y = x - y
x = x - y
x = y - y
Which of the following operator should be used to return true when at least a single operands are true?
!
||
&&
|
Which of the following operator should be used to return true when both operands are true?
&
int x = 25; int y = x / 5; System.out.print(y);
«1234»