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

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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!