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 a sessionfactory? Is it a thread-safe object?

1159


What must a class do to implement an interface?

1097


What are externizable interface?

1007


What’s jboss jbpm?

966


What is re-entrant. Is session beans reentrant. Is entity beans reentrant?

1017


Is “abc” a primitive value?

1051


What are the different methods of identifying an object?

1005


What are the sequence of steps to write pub or sub model kind of application?

2451


What class is used to create Server side object ?

2178


Can you give me a simple example of using the requiredif validator rule?

1067


What method is invoked to cause an object to begin executing as a separate thread?

977


Why use POJO when I can use hashmap

2590


What are callback interfaces?

1051


Write a singleton program?

991


Explain the difference between object state and behavior?

995