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
FrozenT [24]
3 years ago
15

Given a one dimensional array arr, what is the correct way ofgetting the number of elements in arr

Computers and Technology
1 answer:
SVETLANKA909090 [29]3 years ago
3 0

Answer:

The answer is option 1 arr.length.

Explanation:

In java arr.length gives the correct number of elements in the array.The length is function is only applicable for arrays.

The length() method is applicable for strings.

arr.length-1 will give 1 element less.

There is no .size for arrays in java.

So we conclude that arr.length is correct way of getting the number of elements in one dimensional array arr.

You might be interested in
Which invention provided instant communication and information to a massive audience for the first time?
igor_vitrenko [27]
B. Television. It provided <span>instant communication and information to a massive audience for the first time in 1927.

Hope this helps :)</span>
4 0
3 years ago
Read 2 more answers
Consider the following code:
pishuonlain [190]

In python the % operator is modulo. Modulo returns the remainder of two numbers.

19 % 5 = 4 therefore,

print(x%y) would output 4

7 0
3 years ago
what do i do when my mbot is not working but when I plug the cord into the computer it does work but only does one command over
zubka84 [21]
There is probably a default wire out of place or it could be from you yanking the cord out, and doing that wears it down even more.
7 0
4 years ago
How are computers classified into different types? Explain ​
zloy xaker [14]

Answer:

On the basis of size there are four types of computer. They are minicomputer, micro computer, mainframe computer and super computer. Super computer is the fastest, most expensive, big in size, and most powerful computer that can perform multiple tasks within no second.

3 0
2 years ago
Which of these has led to the evolution of mobile marketing?
Nana76 [90]
D. using cell phones in a work place. when cell phones came out with apps and games people started paying more attention to the social media apps and their games then their own job, hope this helps :)
5 0
3 years ago
Other questions:
  • What type of media can be edited and published by anyone?
    6·2 answers
  • Which of the following is where you can save, select a template, change document properties, and close or exit excel?
    8·1 answer
  • Determine and prove whether an argument in English is valid or invalid. About Prove whether each argument is valid or invalid. F
    5·1 answer
  • Do {
    12·1 answer
  • Consider the following relation:CAR_SALE(Car#, Date_sold, Salesperson#, Commission%, Discount_amt)Assume that a car may be sold
    12·1 answer
  • (True/False). If the definition of an IS is the medium for recording and storing data, and disseminating information, this would
    12·2 answers
  • What is a row of data in a database called?<br> Field<br> File<br> Record<br> Title
    10·1 answer
  • Name this<br><br>The feature allows you to add text/picture in the background of the document. ​
    11·1 answer
  • Original phone call greeting for oncologist
    10·1 answer
  • What breakthrough in sound recording facilitated stereophonic recording? Ο Α. overdubbing O B. multitrack recording O C. digital
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!