cecilia16cheng cecilia16cheng
  • 02-06-2021
  • Computers and Technology
contestada

Which of the following passes an int argument into a method named print? Chose one option and explain why.

o print();
o print()+5;
o print("5");
o print(5);

Respuesta :

fichoh
fichoh fichoh
  • 07-06-2021

Answer:

print(5)

Explanation:

Passing an int argument into the method named print ;

print() ; Here, the print method has no argument as it is empty

print()+5; Here also, the print method has no argument and adding +5 is an invalid syntax.

print("5") ; Here, print takes in an argument, however, the argument is a string due to the fact that 5 is enclosed by quotation marks.

print(5) ; Here, the integer is 5 is passed to the print method.

Answer Link

Otras preguntas

Which classification describes ∠ACD and ∠DCF? A. vertical angles B. linear pair C. complementary angles D. supplementary angles
Identify whether the series sigma notation infinity i=1 15(4)^i-1 is a convergent or divergent geometric series and find the sum, if possible. a) This is a co
For every 25 pounds a person is overweight, they should consume __ounces more water than average. Select one: a. 4 b. 8 c. 16 d. 64
On a number line what is the distance between -3/7 and -2/3 ? 23/21 1/4 5/21 -23/21 Please explain
Distinguish lycopodium from equisetum
in ghana, who tool over the throne when the king died
What crop contributed to the success of the English colony of Jamestown? A. Corn B. Cotton C. Tobacco D. Wheat
would you measure the length of a jump rope in inches or in feet? explain your choice
Number 6 and 7 in fraction form and decimal
Criminals are more likely to be _____. A. young women B. young men C. older women D. older men