This topic contains a solution. Click here to go to the answer

Author Question: The reverse method is defined in the textbook. What is list1 after executing the following ... (Read 120 times)

mcmcdaniel

  • Hero Member
  • *****
  • Posts: 550

Question 1

Suppose a method p has the following heading:

public static int[] p()

What return statement may be used in p()?
◦ return {1, 2, 3};
◦ return 1;
◦ return int[]{1, 2, 3};
◦ return new int[]{1, 2, 3};

Question 2

The reverse method is defined in the textbook. What is list1 after executing the following statements?

int[] list1 = {1, 2, 3, 4, 5, 6};
list1 = reverse(list1);

◦ list1 is 6 5 4 3 2 1
◦ list1 is 1 2 3 4 5 6
◦ list1 is 0 0 0 0 0 0
◦ list1 is 6 6 6 6 6 6


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by mcmcdaniel on May 6, 2020

Anna

  • Sr. Member
  • ****
  • Posts: 343
Lorsum iprem. Lorsus sur ipci. Lorsem sur iprem. Lorsum sur ipdi, lorsem sur ipci. Lorsum sur iprium, valum sur ipci et, vala sur ipci. Lorsem sur ipci, lorsa sur iprem. Valus sur ipdi. Lorsus sur iprium nunc, valem sur iprium. Valem sur ipdi. Lorsa sur iprium. Lorsum sur iprium. Valem sur ipdi. Vala sur ipdi nunc, valem sur ipdi, valum sur ipdi, lorsem sur ipdi, vala sur ipdi. Valem sur iprem nunc, lorsa sur iprium. Valum sur ipdi et, lorsus sur ipci. Valem sur iprem. Valem sur ipci. Lorsa sur iprium. Lorsem sur ipci, valus sur iprem. Lorsem sur iprem nunc, valus sur iprium.
Answer Preview
Only 29% of students answer this correctly




mcmcdaniel

  • Member
  • Posts: 550
Reply 2 on: May 6, 2020
Excellent


kthug

  • Member
  • Posts: 332
Reply 3 on: Yesterday
YES! Correct, THANKS for helping me on my review

 

Did you know?

Medications that are definitely not safe to take when breastfeeding include radioactive drugs, antimetabolites, some cancer (chemotherapy) agents, bromocriptine, ergotamine, methotrexate, and cyclosporine.

Did you know?

ACTH levels are normally highest in the early morning (between 6 and 8 A.M.) and lowest in the evening (between 6 and 11 P.M.). Therefore, a doctor who suspects abnormal levels looks for low ACTH in the morning and high ACTH in the evening.

Did you know?

One way to reduce acid reflux is to lose two or three pounds. Most people lose weight in the belly area first when they increase exercise, meaning that heartburn can be reduced quickly by this method.

Did you know?

The first oncogene was discovered in 1970 and was termed SRC (pronounced "SARK").

Did you know?

Opium has influenced much of the world's most popular literature. The following authors were all opium users, of varying degrees: Lewis Carroll, Charles, Dickens, Arthur Conan Doyle, and Oscar Wilde.

For a complete list of videos, visit our video library