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

Which of the following cannot be used as a justification to limit inmates first admendment rights? A: to maintain order B: to improve security C: for rehabili
How do the diffuse modulatory and point-to-point synaptic communication systems in the brain differ? list four ways?
Translate this sentence into an equation. The product of Malik's age and 5 is 85 Use the variable M to represent Malik's age. .
Why did the Second Great Awakening influence people to begin reform movements?
What’s the correct answer
is youthful, chatty, jump, bark a denotative or connotative meaning.A LOT OF POINTS GUYS !
5)What are 2 disadvantages of non-renewable resources? A)inexpensive technology readily available B)they can be limited to a certain area can be expensive to us
give an example where instantaneous speed is different from average speed
When Pip returns home for Mrs. Joe's funeral he's surprised by
How many states ratified the constitution right away?