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 is the main idea of The War Of The Wall​
Usually, an author does not state a_ _ directly. setting conflict theme O resolution
Someone help me on question 10 it’s for culinary
Someone wants to buy a costume for $120. He had a coupon for 33 1/3% off the price. What is the price of the costume after the coupon without tax?
The points (1,r) and (0,-6) fall on a line with a slope of -4. What is the value of r? r=
12y+d= -19y+t solve for y
releases dopamine naturally. All of the following except A. exercise B. eating C. sleeping D. sexual activity Please select the best answer from the choices pro
A scientist notices an increase in the glycose production in the plants he is studying . What are the possible reasons ?
15 POINTS! PLZ HELP! 1. Formal writing is done for ______. a specific audience the general public 2. Type the following sentence with the proper punctu
Have you ever put on a pretense? Explain.