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

What multiplies to 6 and adds to -5?
A theif steals an ATM card and must randomly guess the correct six -digit pin code from a 5-key keypad. Repetition of digits is allowed. What is the probability
A football field is a 64-meter-wide, 100-meter-long rectangle. What is the length of a diagonal of a football field to the nearest meter?
solve 12 – (2 × 3)a.6b.12c.12(2)d. 2 to the 3rd power
If NO=17 and NP=5x-6, what is the value of X. Also how do you find X.
How to write a argumentative essay
what is a monotheistic religion that originated from the teachings of the prophet muhammad
What's the circumference of a circle with a radius of 7 in? Round your answer to the nearest inch. A. 41 in. B. 21 in. C. 44 in. D. 14 in.
which of the following verbs mean "to be"? hacer ser hablar correr estar
reason why peer pressure may lead to unsafe sexual behaviour