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
The 8-bit ____ field is used by source network hosts and forwarding routers to distinguished classes or priorities in ipv6 packe
noname [10]
It is the 8-bit priority field hopes it helps

7 0
3 years ago
Which of the listed tools would a barber likely use in the following scenario?
Charra [1.4K]

Answer:

Please elaborate more your question so I can answer your question accurately.

Explanation:

6 0
2 years ago
A line graph is a great tool for showing changes over time. Why is a line graph better than other graphs at showing this type of
Marizza181 [45]

Answer:

Line graphs allow us to see overall trends such as an increase or decrease in data over time. Bar graphs are used to compare facts.

3 0
2 years ago
I would A lot of knowledge and education for computers and <br> Technology
borishaifa [10]

Answer:

Pay attention in your class.

Explanation:

If you paid attention in your class, you would have at least a basic understanding of the material.

7 0
2 years ago
Read 2 more answers
In the program below, which two variables have the same scope?
bagirrra123 [75]

Answer:

rhymeWord

Explanation:

correct answer edge 2020

3 0
3 years ago
Read 2 more answers
Other questions:
  • A person painting his house dumps the unused paint on the ground. Which of the following resources will this most likely pollute
    14·1 answer
  • James, a technician, needs to format a new drive on a workstation. He will need to configure read attributes to specific local f
    5·1 answer
  • A computerized spreadsheet program is useful for
    6·2 answers
  • If a memory reference takes 100 nanoseconds, how long does a paged memory reference take?
    6·1 answer
  • Assume that name has been declared suitably for storing names (like "Misha", "Emily" and "Sofia"). Assume also that stdin is a v
    9·1 answer
  • What happens when a computer gets a virus?
    6·2 answers
  • Create the following new exceptions: PokemonException, which extends the Exception class. It must have a no-parameter constructo
    13·1 answer
  • Consider the following code segment.
    10·1 answer
  • What does ATM mean on lego mario mean I know that this is not school related but I trying to help my brother ​
    5·1 answer
  • What do we call the software which programmers use to program?​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!