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 51 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
Gracias!


anyusername12131

  • Member
  • Posts: 327
Reply 3 on: Yesterday
Wow, this really help

 

Did you know?

Certain rare plants containing cyanide include apricot pits and a type of potato called cassava. Fortunately, only chronic or massive ingestion of any of these plants can lead to serious poisoning.

Did you know?

Asthma-like symptoms were first recorded about 3,500 years ago in Egypt. The first manuscript specifically written about asthma was in the year 1190, describing a condition characterized by sudden breathlessness. The treatments listed in this manuscript include chicken soup, herbs, and sexual abstinence.

Did you know?

The most dangerous mercury compound, dimethyl mercury, is so toxic that even a few microliters spilled on the skin can cause death. Mercury has been shown to accumulate in higher amounts in the following types of fish than other types: swordfish, shark, mackerel, tilefish, crab, and tuna.

Did you know?

There used to be a metric calendar, as well as metric clocks. The metric calendar, or "French Republican Calendar" divided the year into 12 months, but each month was divided into three 10-day weeks. Each day had 10 decimal hours. Each hour had 100 decimal minutes. Due to lack of popularity, the metric clocks and calendars were ended in 1795, three years after they had been first marketed.

Did you know?

A cataract is a clouding of the eyes' natural lens. As we age, some clouding of the lens may occur. The first sign of a cataract is usually blurry vision. Although glasses and other visual aids may at first help a person with cataracts, surgery may become inevitable. Cataract surgery is very successful in restoring vision, and it is the most frequently performed surgery in the United States.

For a complete list of videos, visit our video library