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

Author Question: How can you initialize an array of two characters to 'a' and 'b'? (Read 59 times)

jjjetplane

  • Hero Member
  • *****
  • Posts: 556

Question 1

Which of the following statements is valid?
◦ double d[] = new double[30];
◦ int i = new int(30);
◦ char[] c = new char[4]{'a', 'b', 'c', 'd'};
◦ char[] c = new char();
◦ int[] i = {3, 4, 3, 2};

Question 2

How can you initialize an array of two characters to 'a' and 'b'?
◦ char[2] charArray = {'a', 'b'};
◦ char[] charArray = new char[2]; charArray = {'a', 'b'};
◦ char[] charArray = {'a', 'b'};
◦ char[] charArray = new char[]{'a', 'b'};


Related Topics

Need homework help now?

Ask unlimited questions for free

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

underwood14

  • Sr. Member
  • ****
  • Posts: 346
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 55% of students answer this correctly




jjjetplane

  • Member
  • Posts: 556
Reply 2 on: May 6, 2020
:D TYSM


elyse44

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

 

Did you know?

According to the American College of Allergy, Asthma & Immunology, more than 50 million Americans have some kind of food allergy. Food allergies affect between 4 and 6% of children, and 4% of adults, according to the CDC. The most common food allergies include shellfish, peanuts, walnuts, fish, eggs, milk, and soy.

Did you know?

Disorders that may affect pharmacodynamics include genetic mutations, malnutrition, thyrotoxicosis, myasthenia gravis, Parkinson's disease, and certain forms of insulin-resistant diabetes mellitus.

Did you know?

Illicit drug use costs the United States approximately $181 billion every year.

Did you know?

Every flu season is different, and even healthy people can get extremely sick from the flu, as well as spread it to others. The flu season can begin as early as October and last as late as May. Every person over six months of age should get an annual flu vaccine. The vaccine cannot cause you to get influenza, but in some seasons, may not be completely able to prevent you from acquiring influenza due to changes in causative viruses. The viruses in the flu shot are killed—there is no way they can give you the flu. Minor side effects include soreness, redness, or swelling where the shot was given. It is possible to develop a slight fever, and body aches, but these are simply signs that the body is responding to the vaccine and making itself ready to fight off the influenza virus should you come in contact with it.

Did you know?

The FDA recognizes 118 routes of administration.

For a complete list of videos, visit our video library