1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
-Dominant- [34]
3 years ago
11

To initialize a String array names to store the three Strings "Huey", "Duey" and "Louie", you would do:

Computers and Technology
1 answer:
Alina [70]3 years ago
7 0

Answer:

B) String[ ] names = {"Huey", "Duey", "Louie"};

Explanation:

In Java programming language, arrays are declared by first Writing the data type of the elements that will be stored in the array, in this case String. This is followed by square brackets indicating that the variable is an array, followed by the array name which must follow the rules of naming variables. The example below is a valid declaration of an array.

 String[ ] names;

Next in java we can initialize the elements either by using the new keyword and specifying the length of the array to create the array in memory like this;

String[ ] names = new String[3];

Or we initialize by assigning values in curly braces seperated by commas like in the question ablove.

You might be interested in
When you pass an array as an argument to a function, the function can modify the contents of the array?
taurus [48]
In most languages. Primitive data types ( char, int, float, bool, maybe string ) are usually passed by value, but compound data types are passed by reference, so you're not working on a copy but on the original.
8 0
3 years ago
No spamming or links
Hitman42 [59]
I think the answer is true,
8 0
3 years ago
Read 2 more answers
Adam is so good at playing arcade games that he will win at every game he plays. One fine day as he was walking on the street, h
klio [65]

Answer:

what the answer chaoices

Explanation:

brainlest me please

3 0
3 years ago
Which command displays the status of the ipsec installation?
Alexandra [31]
Character command shows the status.
8 0
3 years ago
Pls help me computer science discoveries
lara31 [8.8K]

Answer:

jdinwoahdjsioadjsakodsiaohdeioajfnsohfujkdshksyfneowjdfikdjiadjsadhnsuidghaiudbnha

Explanation:

3 0
3 years ago
Other questions:
  • This type of connection uses radio waves to connect devices on a network.
    15·2 answers
  • Describe shortly about the following Linux directories and theirpurpose,1. lib2. etc3. Boot4. Root5. home
    6·1 answer
  • Which of the following components does a typical two stroke engine contain
    7·2 answers
  • Which sentence uses a pair of synonyms? Because there was so much shouting, many of the protestors began screaming in order to b
    6·2 answers
  • The algorithm and flowchart
    9·1 answer
  • You have just finished upgrading the 250 w power supply in your desktop computer to a 450 w power supply. now the bios doesn't r
    7·1 answer
  • Caroline is building an expert system for wartime defense. Which of these is true about the system she is building?
    14·1 answer
  • You are a Data Scientist at Anthem Blue Cross Blue Shield. You want to check if a patient will develop diabetes. Please write th
    5·1 answer
  • What is normalization?
    7·1 answer
  • How many ways are used to insert an image from file?koi h kya​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!