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


Please Help Members By Posting Answers For Below Questions

What is jrmp?

544


What do you understand by an io stream?

578


What are serialization and deserialization?

723


Is singleton class thread safe?

531


How to set the permissions to a file in java?

535






Explain how hashmap works?

588


What is final variable?

494


Difference between character constant and string constant in java ?

555


What is the use of System class?

604


Explain about sets?

565


How do you achieve polymorphism in java?

519


Can a class be private or protected in java?

547


What do you mean by default constructor in java?

574


What is the latest java version?

553


How to sort array of 0 and 1 in java?

541