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
olga_2 [115]
3 years ago
11

Assume that x is a variable that has been declared as an int and been given a value. Assume that twice is a method (in the same

class as the caller) that receives a single integer parameter and returns twice its value. (So if you pass 7 to twice it will return 14. Thus the expression twice(7) has the value 14. Write an expression whose value is eight times that of x without using the standard Java arithmetic operators (*,+, etc.). Instead, use calls to twice to accomplish this. In this exercise you must write this as a single expression-- you must not write any statements. Also, you may only use the twice() function-- no other functions or operators.
Computers and Technology
1 answer:
Anastasy [175]3 years ago
4 0

Answer:

Arrays are indexed from 0 in pretty much every language, except stupid Microsoft languages.

Lets say that ARR_SIZE is 5 for example.

So you have an array of 5 elements. They are indexed from 0 - 4.

arr[0] // First element

arr[4] // Last element

Therefore arr[ ARR_SIZE -1 ] is the last element of the array.

That's why for loops to iterate through arrays are wrote like:

for(int i = 0; i < ARR_SIZE; ++i)

You might be interested in
Convert 2910 to binary, hexadecimal and octal. Convert 5810 to binary, hexadecimal and octal. Convert E316 to binary, decimal an
Burka [1]

Answer:

2910 to binary = 101101011110

2910 to hexadecimal = B5E

2910 to octal = 5536

E316 to binary = 1110001100010110

E316 to octal = 161426

E316 to decimal = 58134

5916 to binary = 101100100010110

5916 to decimal = 22806

5916 to octal = 54426

010010102 to decimal = 149

010010102 to octal = 225

010010102 to hexadecimal = 95

FOR 438 and 618, 8 is not a valid digit for octal..

5 0
4 years ago
Host B is sending an email intended for the user on Host A to the email server. What protocol is being used to send the message
Lynna [10]

Answer:

I think that part A is correct option

6 0
4 years ago
Ben is creating a presentation on the causes and effects of World War II. On a slide, he organizes text across two columns and u
podryga [215]
Ben can use the "Appear" animation, but he has to make sure he sets the effect options to "By paragraph", otherwise all bullets appear at the same time. I'm sure Ben can figure that out.
7 0
3 years ago
Read 2 more answers
Who has helped the most people on brainly? who has the most answers? anybody know?
galina1969 [7]

Answer:

If you go in influence their is a option to check who has reached the most people

give me brainest please

4 0
3 years ago
Read 2 more answers
Match the instruments with their uses.
Aneli [31]
Microscope - 1
Telescope - 2
Ruler - 3
Streak plate - 4

7 0
3 years ago
Read 2 more answers
Other questions:
  • What are five features of word 2016 you would use to capture the attention of the target audience? Defend you decisions
    9·1 answer
  • Kai is a software engineer who started his own IT consulting firm. His friend, Catalina, is the owner of a store that sells offi
    13·2 answers
  • A powerful computer that acts as a hub for other computers is a called a ______.
    6·2 answers
  • _____ is the software that protects you computer from harmful files, Trojan horses, and worms.
    13·2 answers
  • There is the Iphone MAX, Iphone XR and Iphone XS. which iphone is the very NEWEST and which one do you recommend? explain.
    5·2 answers
  • Experienced students may serve as mentors if they are at least age 21 and have at least 3 years of post-secondary education. In
    5·1 answer
  • A tornado destroyed many
    6·2 answers
  • Colorful bead bracelet in codehs
    14·1 answer
  • Q1. Information systems that monitor the elementary activities and transactions of the organizations are: I a. Management-level
    11·1 answer
  • 2. Which one of the following is the purpose of relating tables in a database?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!