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 sentence contains an incorrect possessive form? a. We borrowed Ashley's large wooden spoon. b. The boys joke made us all laugh. c. I followed Grandmoth
What do Conclusion mean?
All of the following are excretory organs except the A. skin. B. lungs. C. heart. D. kidneys.
Under what charges was Nelson Mandela arrested in 1964? a. Sabotage and Treason b. Instigating Rebelion c. Supporting apartheid d. Founding the a. N.C
What type of volcano has alternate layers of ash and lava?
Why does it take 3 copies of 1/6 to show the same amount as 1 copy of 1/2?
Smoking, drinking, or using drugs are all considered to be negative ways of coping with stress.
Which of the following is not a function of bones in the human skeletal system? a. store minerals c. move body parts b. regulate body temperature d. protect
Another way to write 6times57
how to subtract a number(174)to a percentage(30%)