How many ways can an argument be passed to a subroutine?
Answer Posted / janet
An argument can be passed in two ways. They are passing by
value and passing by reference.
Passing by value: This method copies the value of an
argument in to the formal parameters of the subroutine.
Passing by reference: In this method, a reference to an
argument(not the value of the argument) is passed to the
parameter.
| Is This Answer Correct ? | 14 Yes | 2 No |
Post New Answer View All Answers
Is java pass by value or pass by reference?
Why do we need hashmap in java?
What is hashmap in java?
How do you declare a destructor in java?
How are variables stored?
What does the exclamation mark mean in java?
What is a method header?
What data structures are used to perform recursion?
What is an off by one error in java?
What is static class
How to find the given number is a prime number or not by getting input from the user
What is thread safe in java?
What are inner classes or non static nested classes in java?
Can we pass null as argument in java?
Explain the difference between protected and default access.