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

please give three reasons why a battle would happen in a certain area ? :)
At Jones College, there are a total of 100 students. If 30 of the students have cars on campus, and 50 have bicycles, and 20 have both cars and bicycles, then h
estimate for 412*5.904/0.195any one knw the estimate for this and how to work it out
If a - 3= 7, then 2a - 14 =
Why does an electrically heated mirror stay clear when a person has a shower?
could you tell me what is an embryo?
Which Property of Equality should be used first to solve the equation p/7 - 5 = -3 for p Addition Property of Equality Subtraction Property of Equality Multipli
could you tell me what is a mutagen?
list the 6 characteristics of american economy and explain how they help the economy grow
WHAT is the answers to 2a 2b and 2c ?