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
I have a question, but it's not a math question. Can anyone give me 5 unblockers for school computers? If you answer this, you w
ValentinkaMS [17]

Answer:

I mean if your talking about games then just try Cool math I will give link in comments

Explanation:

4 0
1 year ago
Read 2 more answers
Does any body like animal jam
cricket20 [7]

Answer:

Never used it so I do not know.

Explanation:

To be honest i thought you meant like animal jelly at first

7 0
3 years ago
Read 2 more answers
Two forms of compression are lossy and lossless. State giving reasons which
Helen [10]

Answer:

(i) When transmitting a draft manuscript for a book, the lossless compression technique is most suitable because after decompression, the data is rebuilt and restored in its form as it was from where it originated

(ii) When transmitting a video recording which you have made of the school play, a lossy compression technique is most suitable because the large size of video files require the increased data carrying capacity which is provided by the lossy transmission technique. The quality of the video can be reduced without affecting the message intended to be delivered

Explanation:

4 0
2 years ago
What is the data rate of a DS0 signal?
djyliett [7]

Answer: 64 Kbps

Explanation:

3 0
2 years ago
Stock ____ firms trade financial securities between a buyer and a seller.
diamong [38]
<span>Stock market firms, also known as brokerage firms, assist in the act of buying and selling financial securities. These trades are financed through financial institutions for security.</span>
3 0
3 years ago
Other questions:
  • Which strategy are you using when you only read the title, section headings, and captions?
    12·2 answers
  • List and the deference between MS access objects​
    8·1 answer
  • What does the hard disk drive do? It stores all of the information on a computer. It controls a computer’s operating system. It
    12·2 answers
  • Write the function mystrchr(). the function has two parameters: a const char * s pointing to the first character in a c-style st
    14·1 answer
  • Garry is a record executive who is building a data table to include in a presentation about one of his artists. The table is mea
    15·1 answer
  • Write an algorithm to solve general formula? ​
    10·1 answer
  • A host is on the 192.168.146.0 network that has a subnet mask of 255.255.255.0. The binary value of the host portion is 11010101
    8·1 answer
  • Differentiate between patent and copyright.
    6·2 answers
  • Read each of the following statements about Computer Science and explain why you think that statement is true.
    9·1 answer
  • When writing a function or a formula in a spreadsheet,what is the first u should do​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!