Question 1 In java, an array can contain several types of elements True or False
ID: 3876634 • Letter: Q
Question
Question 1
In java, an array can contain several types of elements
True or False ?
Question 2
All operators in java have the same precedence
True or False ?
Question 3
int computeValue (int x, int y)
is a function which receives 2 parameters x and y, passed by reference
True or False ?
Question 4
There are 3 main logical operators in java:
&& (AND), || (OR), and ! (NOT)
True or False ?
Question 5
In java, when passing an entire array to a function as an argument, the default passing mechanism is by reference
True or False ?
Question 6
According to De Morgan's law,
!(A || B) is equivalent to !A || !B
Where ! means NOT and || means OR
True or False ?
Question 7
In Java, variable names are case sensitive, so myName is not the same as mynamE.
True or False ?
Question 8
When writing
Variable1 = Variable2, the content of Variable2 gets copied in Variable1.
True or False ?
Question 9
int computeValue (int x, int y)
is a function which returns an integer
True or False ?
Question 10
int computeValue (int x, int y)
is a function which receives 2 parameters x and y, passed by value
True False ?
Question 11
In Java, it is possible to have two functions by the same name as long as
1. they don't have the same number of parameters ?
3. The parameter list is not identical ?
4. They don't return the same type of value ?
5. Any of the above is true ?
Question 12
(a || b && c) is equivalent to
1. a || (b &&c) ?
2. (a || b) && c ?
3. why bother, it is all the same anyways?
Question 13
In java, Variable1 = Variable2 is the same as
Variable1 == Variable2
True or False ?
Question 14
in the following code:
int[] list = {1, 2, 3, 4, 1, 2, 3};
list[1] contains
options:
1?
2?
3?
4?
Question 15
int[][][] myArray = new int[2][3][4];
creates an array of
1. 24 integers ?
2. 24 elements, some of which are integers ?
3. 12 integers ?
4. 12 elements, some of which are integers ?
Question 16
According to De Morgan's law,
!(A && B) is equivalent to !A && !B
Where ! means NOT, && means AND and || means OR
True or False ?
Question 17
Is a set of rules which simplify complex logical equations
True or False ?
Question 18
In Java, && gets evaluated before ||
True or False ?
Question 19
When writing
Variable1 = Variable2,
the contents of Variable2 are tested against the contents of Variable1;
If they are equal, then the evaluation will yield true, otherwise it will yield false
True or False ?
Question 20
in the following code:
int myVal = computeValue(2, 3);
int computeValue (int x, int y) {
int result = x+y;
return result;
}
int myVal = computeValue(2, 3);
is
1. a parameter ?
2. A function call ?
3. the function body ?
4. the header of the function computeValue ?
ANSWER ALL PLEASE
Explanation / Answer
1) false
Because whatever data type you are going to mention,the element should be of same type or it will give error.
2)false
3)False
In pass by reference it should be int computer(int &x,int &y)
4)True
5)false
6)false
7)True
8)true
9)true
10)true
11)all of the above is true
12) 2
13)false
14)list[1] contains value 2
15)24 integers
2*3*4 give the number of elements
16)false
17) i think there is something missing in this question but yes there are some set of rule like De Morgan's law to simplify logical equations.
18)false
19)false because it is assignment operator
== Has testing features
20)function call
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.