35.8k views
5 votes
Which of the following types can be permanently modified in a method when it is passed as a parameter to a method?

1) int
2) float
3) string
4) list

1 Answer

4 votes

Final answer:

The type 'list' can be permanently modified in a method when it is passed as a parameter.

Step-by-step explanation:

In computer science, objects of certain types can be passed as parameters to methods and modified permanently.

In this case, the type list can be modified in a method when it is passed as a parameter.

For example, if we have a method that takes a list as a parameter, we can add, remove, or modify elements in that list within the method, and the changes will be reflected outside of the method.

User Shehram Tahir
by
7.8k points

No related questions found