Lavi M.

asked • 04/05/20

Write True or False for each of the following statements. (Corecct if fales)

1 If a method does not return a value, the return value type must be static.

2 The expression !(true || true && false || !true) is evaluated to true.

3 Every array has a length that specifies the number of elements in the array.

4 It is possible for the body of a do-while statement to never be executed.

5 The statement import java.*.*; is valid if placed at the very top of a Java source file.

6 The expression s.indexOf(",") returns the position of a comma in s, a String object.

7 The following statement System.out.print("Hi".compareTo("Hi") == 0); is correct.

8 The switch selection structure must end with the default case.

9 Variables declared in the body of a particular method are known as local variables.

10 int array = new int[10]; creates an integer array of size


1 Expert Answer

By:

Patrick B. answered • 04/05/20

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.