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
ololo11 [35]
3 years ago
13

Provide Java code to illustrate how to create an array, reference an array, and address an element of an array.

Computers and Technology
1 answer:
tia_tia [17]3 years ago
4 0

Answer:

Hi!

<u>To create an array:</u>

type[] varname OR type varname[]

where:

  • type is the class of the array.
  • var-name is the name of the variable.
  • [] indicates that the instance would be an array.

Examples:

float floatArray[];

boolean[] booleanArray;

String[] stringArray;

Object objectArray[];

<u>To reference an array:</u>

type varname1[];

type varname2[] = varname1;

where:

  • After assign varname1 to varname2, varname2 points to the elements of varname1;

<u>To address an element in an array</u>:

type varname[n];

type i = varname[i];

If you want to access to the i element of the array you can do : varname[i];

You might be interested in
You have found statistics on the Internet that you would like to use in your speech.
miss Akunina [59]

Answer:

You cite them correctly and that the statistics are real.

Explanation:

5 0
3 years ago
A major problem with alcohol adverstising is that
Pavel [41]

Answer:

A chronic disease characterized by uncontrolled drinking and preoccupation with alcohol.

Alcoholism is the inability to control drinking due to both a physical and emotional dependence on alcohol.

Symptoms include a strong need or urge to use alcohol. Those with alcohol use disorder may have problems controlling their drinking, continue to use alcohol even when it causes problems, or have withdrawal symptoms when they rapidly decrease or stop drinking.

Treatment involves counseling, such as behavioral therapy, and medications that reduce the desire to drink. Some people need medical detoxification to stop drinking safely. Mutual support groups help people stop drinking, manage relapses and cope with necessary lifestyle changes.

Explanation:

8 0
3 years ago
Can someone please help me! It’s due Thursday!
Eva8 [605]

Answer:

if the input is zero the out put is 1

Explanation:

because if you think about it if the input was 1 the output would be zero

7 0
2 years ago
What substance was the first photograph made from?
dybincka [34]

Answer:

bitumen

Explanation:

5 0
3 years ago
Identify measures to protect your computer against threats from human actions. You cannot access a file in a computer that belon
scZoUnD [109]

Answer:

Firewalls

Explanation:

A firewall is simply a network security system whose main duty is. to prevent unwanted access to. private network.

Firewalls is measures to protect your computer against threats from human actions.

It is also the one singular thing that prevents you from accessing the file on your friends system.

5 0
3 years ago
Other questions:
  • String word = “Awesome”;
    9·2 answers
  • The issue with discovering a perfect solution to a problem is that ________.
    10·2 answers
  • he specific gravity of gold is 19.3. Write a MATLAB program that will ask the user to input the mass of a cube of solid gold in
    15·1 answer
  • Which of the following describes the difference in light intensity between the brightest white and the darkest black that can be
    15·1 answer
  • A collection of facts can be copyrighted, but only if the collection is ____ in a way that causes the resulting work to rise to
    14·1 answer
  • Harold included an excerpt from an Internet magazine in an article he wrote for the school newspaper. However, he did not ask pe
    13·2 answers
  • Do debit cards offer the highest level of fraud pretection?
    10·1 answer
  • Travis just got promoted to network administrator after the previous administrator left rather abruptly. There are three new hir
    14·1 answer
  • Are you absent minded because you are thinking of an online activity?​
    12·1 answer
  • What do you mean by HDML coding ​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!