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

Find the percent of the number. 100% of 20
What does 1 3/4 ÷ 7/1 equal?
which best describes the area of a polygon A. the distance around the outside edge B. the number of cubic units contained in the interior C. the number of squ
describe an application of biological classification
Scientists conduct crash tests on cars to determine their safety. Suppose the maximum allowed deceleration during a crash is –23 m/s². The crash tests on the la
Eric is buying a dvd that costs $19.83. he has to pay 7% sales tax. how much will the sales tax be?
What is the formula for the circumference of a circle?
Help me plz, I will upvote Match the meaning to the root. 1. time 2. bad 3.cut 4.write 5.new 6.speak 7.heat 8.good A: chron B: neo C: dict D:
Which main groups supported Mussolini’s effort to overthrow the government in Italy?
What is the answer to this problem evaluate the expression 7.5-3.2+4^3÷2