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

Why are different countries contructing bihars in Lumbini Area?​
practice exercise 1-5 number line
hi my name is trey and i have a basketball game tomorrow, well i'm a point guard and i got shoe game. Any tips?
True or False The expression 1/i written in a+bi form is -i
ito ay nangangahulugan na paglalarawan ng ibabaw o balat ng lupa
Which of the following types of particles found in an atom has no charge? A. electron B. nucleus C. neutron D. proton
LANGUAGE QUESTION I AM SO CONFUSED
I WILL GIVE BRAINLEST Angela has 5 fewer quarters than twice the number of her dimes. If d represents the number of dimes Angela has, which expression represent
Find the equation of OP.
What do the skin and urinary system have in common? O Both remove filtered wastes and reabsorb blood. Both remove undigested food from the body. O Both remove u