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]
4 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]4 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
________ allows only limited use of media that has been legally purchased.
Reptile [31]
Digital Rights Management (DRM) allows only limited use of media that has been legally purchased. The DRM includes access control technologies for <span>copyright protection for </span>digital media. DRM defines <span>what you as a software or hardware user can and can't do with the media and hardware you've purchased. </span> 
3 0
3 years ago
During the troubleshooting of a pc that will not boot, it is suspected that the problem is with the ram modules. the ram modules
Damm [24]
The modules were somehow disconnected
8 0
4 years ago
Logical design is tied to a specific hardware and software platform. a. True b. False
cluponka [151]

Answer:B false

Explanation:

3 0
3 years ago
Given the following function definition, what modifications need to be made to the search function so that it finds all occurren
Naddika [18.5K]

Answer:

The answer is "Option b".

Explanation:

In the given question, a function "search" is defined. That searches element that is passed in the function by parameter. To search more quickly we must add another parameter in the function. and other options are not correct that can be described as:

  • In option a, We add another element in parameter to start searching not to stop.
  • In option c, The function can not find an element that occurs in the array target.
  • In option d, Function will not return array it will return only index value.

7 0
3 years ago
Why is my computer getting slower and slower? What can i do without buying a virus scanner?
NeTakaya
It could be that your computer is simply getting older and more worn out, I suggest downloading MalwareBytes, it's a free anti-virus software that I use personally.
7 0
3 years ago
Read 2 more answers
Other questions:
  • _ is a model of computing in which computer processing, storage, software, and other services are provided as a shared pool of v
    10·1 answer
  • I don't understand question how do I work it out?
    7·2 answers
  • Stella is a bank executive. She is preparing a spreadsheet on the loan repayment schedules of customers. Which function can she
    9·1 answer
  • Templates allow for the quick creation of _____.
    7·1 answer
  • Help please brainliest
    8·1 answer
  • LAB:
    8·1 answer
  • Which two ways should a developer create this functionality? A developer is asked to create a PDF quote document formatted using
    13·1 answer
  • Assume user_name equals "Tom" and user_age equals 22. What is printed on the console when the following statement is executed? c
    14·1 answer
  • What read a page on website​
    15·1 answer
  • A company Digicom Parts manufactures 2 types of unique products for laptop and desktop computers. It manufactures 10 types of la
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!