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
kumpel [21]
4 years ago
6

Which of the following statements about creating arrays and initializing their elements is false?

Computers and Technology
1 answer:
algol134 years ago
5 0

Answer:

b. When an array is created, the number of elements must be placed in square brackets following the type of element being stored.

Explanation:

In Java an uninitialized array contains null values. Thus statement c is true as well.

Also generally for initializing and displaying array elements a for loop is used. Hence statement d is also correct.

In Java syntax for declaring an array is as follows:

Array declaration:

type [] array_name ;

Array instantiation(memory allocation):

type [] array_name = new array_name [size of array];

From the above it can be seen that the statement a is true and statement b is false as number of elements in array are not mentioned after the type.

Hence the correct answer is b.

You might be interested in
Which of the following inputs help robotic vacuum cleaners maneuver around obstacles?
Alja [10]

Answer:

c lasers and sensors

Explanation:

7 0
3 years ago
Read 2 more answers
The type of human hair wig that is the most costly is:
RSB [31]

Answer: india

Explanation:

5 0
4 years ago
Hot five was the famous band of which musician?
slega [8]
Hot Five was Louis Armstrong's first recording jazz band.
4 0
4 years ago
Question 7 (1 point)<br> Increasing hue levels means increasing saturation.<br> True<br> False
Temka [501]

Answer:

mae me brainlier

false

7 0
3 years ago
A palindrome is a string that reads the same from left to right and from right to left. Design an algorithm to find the minimum
stepladder [879]

Answer:

Explanation:

The following code is written in Python. It is a recursive function that tests the first and last character of the word and keeps checking to see if each change would create the palindrome. Finally, printing out the minimum number needed to create the palindrome.

import sys

def numOfSwitches(word, start, end):

   if (start > end):

       return sys.maxsize

   if (start == end):

       return 0

   if (start == end - 1):

       if (word[start] == word[end]):

           return 0

       else:

           return 1

   if (word[start] == word[end]):

       return numOfSwitches(word, start + 1, end - 1)

   else:

       return (min(numOfSwitches(word, start, end - 1),

                   numOfSwitches(word, start + 1, end)) + 1)

word = input("Enter a Word: ")

start = 0

end = len(word)-1

print("Number of switches required for palindrome: " + str(numOfSwitches(word, start, end)))

3 0
3 years ago
Other questions:
  • Which element in Access is an ideal data source?
    12·2 answers
  • A company ABC asked you to design a simple payroll program that calculates and employee's weekly gross pay, including any overti
    9·1 answer
  • Clicking on the Spelling &amp; Grammar button is one way to correct a spelling error in Word. Please select the best answer from
    7·2 answers
  • In 1997, microsoft was accused of using a monopoly in operating systems to control the market for _____.
    8·2 answers
  • The __________ utility has the capability to manage users, create and administer user groups, and apply user rights to those use
    8·1 answer
  • What is the most used piece of technology in education?
    13·1 answer
  • (Java) In the ChiliToGo program in Exercise 12, the costs to produce an adult meal and a child’s meal are $4.35 and $3.10, respe
    8·1 answer
  • Write a paragraph on 'Save Earth Save Life.'​
    12·1 answer
  • What is a decryption key?​
    8·1 answer
  • Which of the following statements is true for plotly?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!