How many ways can an argument be passed to a subroutine?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / vijayakumar chinnasamy
In java the arguments are passed by pass by value . Using
this pass by value way u can pass both primitive and object
type values.
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / samborn pen
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 into the
formal parameter 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 ? | 0 Yes | 0 No |
what is difference between global methods and local methods?
What's the base class in java from which all classes are derived?
Name the methods that used to get and set the text label displayed by a Buttonobject?
What is the difference between final, finally and finalize() in java?
Can we override a variable in java?
What happens if we don’t override run method ?
How to prevent a field from serialization ?
Why isn’t there operator overloading?
Is math an abstract class in java?
Why do we use threads in java?
What is a subsequence of a string?
The following program is Overloading or Overriding? public class PolymorphismEx { public int sampleMethod(int a) { return a; } public String sampleMethod(int a) { return "Is it Overloading or Overriding???"; } }
4 Answers Ness Technologies, TCS,