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 measure of the numbered angles in each rhombus
why are new pennies made with less copper than old pennies
How do you determine which size micropipette to use if more than one have the volume capabilities needed to measure the desired amount?
what is, v(20)=450(1+0.025)^20
Find the area of the triangle. Round your answers to the nearest tenth if necessary. 14 in 125 degrees 15 in
How did Japan acquire the natural resources needed for industrialization before the Great Depression
can some one help me for 100pts
A Texas household receives a Social Security check for $1500, which it uses to purchase a $40 pair of shoes made in Thailand by a Thai firm, a $1240 television
what is ( 8x²y⁰) (-10x³y²z) answer after you multiplied the coefficient and added the exponents ??​
A scale drawing of a room is shown below. In the drawing, the room is 73 inches long and 5 inches wide. What is the actual area of the room?