Need HELP on JAVA!!!!!


Question 17
The image below shows the Javadoc for all constructors of a class named Shoe.



Which of the following constructor calls will NOT compile correctly?




Shoe E = new Shoe(7, "Left");

Shoe B = new Shoe(8);

Shoe A = new Shoe();

Shoe D = new Shoe(13 / 2, true);

Shoe C = new Shoe(11, false);

Flag this Question
Question 181 pts
Consider the following code:

String q = "power";
String r = "brown";
System.out.println(q.indexOf(r.substring(3, 4)));
What is output?


3

2

o

1

w

Flag this Question
Question 191 pts
What is output?

System.out.println("The answer is: " + Math.pow(2, 3));

The answer is: 6

The answer is: 1

The answer is: 8

The answer is: 6.0

The answer is: 8.0

Flag this Question
Question 201 pts
Consider the following code:

int x = 5;
int y = 8;
System.out.println(x + y);
What is output when this code is executed?


5 8

58

85

1

13

Need HELP on JAVA Question 17 The image below shows the Javadoc for all constructors of a class named Shoe Which of the following constructor calls will NOT com class=
Need HELP on JAVA Question 17 The image below shows the Javadoc for all constructors of a class named Shoe Which of the following constructor calls will NOT com class=
Need HELP on JAVA Question 17 The image below shows the Javadoc for all constructors of a class named Shoe Which of the following constructor calls will NOT com class=

Respuesta :

Question 17:

Shoe E = new Shoe(7, "Left");

This line of code will not compile correctly because the programmer provided a string when a boolean value was required. "Left" should either be true or false.

Question 18:

2 is the output.

The substring of r at index 3, 4 is w and w is at index 2 in the q variable.

Question 19:

The output is: The answer is: 8.0. The math.pow function returns floating type values and that's why you get a decimal point.

Question 20:

The integers are being added together.

5 + 8 = 13

The output is 13.