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 effects can child abandonment have on children, later in their lives?
The product of some negative number and 3 less than twice that number is 209. find the number
In the ecological systems approach, the _______ is made up of the people and relationships that most directly influence the child's life. A. macrosyst
the second angel im a triangle is 2° less the 3 times the first angle the third Angle is 14° more than twice the first angle find the measure of all three angle
Graph the linear function f(x) =3x+2 and find the maximum on the interval [-1,1]
I really need help with #4
How were christian and muslim states governed in the early middle ages?
Four elements make up about 96% of the mass of the human body. which are those four elements? (choose all that apply.) four elements
X(2•x)= 4•5•y You get 77 points in you can help me with this!
When is income considered to be earned by an​ accrual-basis taxpayer?