Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Does Java pass arguments by value or reference?

Answer Posted / prs01

Pass by value.
1. When passing primitives, it passes a copy of the
variable to the method. Any change made in the method does
not reflect in the calling method.
2. When dealing with objects, a copy of their
reference/address is passed. Thus the change made to the
object is reflected in the calling method.

Is This Answer Correct ?    22 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is meant by JRMP?

2361


Describe, in general, how java's garbage collector works?

1041


what are the advantages of JTA over JTS?

2219


What class is used to create Server side object ?

2261


What is mdb and what is the special feature of that?

1058


What restrictions are placed on the location of a package statement within a source code file?

1121


Why do threads block on i/o?

1270


Explain RMI Architecture?

1103


What is Stream Tokenizer?

2277


Explain the steps in details to load the server object dynamically?

5110


Describe activation process?

2670


What class is the top of the awt event hierarchy?

1114


What is the form of storage space in java?

2256


Why a client should be multithreading? Explain.

1096


What is the difference between the session.update() method and the session.lock() method?

1030