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...

Java support what type of parameter passing ?

Answer Posted / chandrarekha

all the primitive or the simple datatypes(int,float,boolean
etc) are passed as call by value whereas the abstract
datatypes(class objects) are by call by reference.....
for example...
class classA
{
String name;
}
class classB
{
classA a=new classA();
a.name="java";
call(a);//a is an object of classA
void call(classA x)
{
x.name="JAVA";
}
public static void main()
{
......

this is call by reference...

Is This Answer Correct ?    10 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How strings are created in java?

1045


Can we define constructor in inner class?

1006


Why do we use return statement?

1046


Can a class with private constructor be extended?

948


How we can skip finally block of exception even if some exception occurs in the exception block in java?

950


How would you use Bubble Sort to sort the number of elements?

1008


can I implement my own start() method? : Java thread

994


What will be the initial value of an object reference which is defined as an instance variable?

1150


Is java programming easy?

1004


What is casting in java programming?

1041


What is the meaning of variable in research?

1018


Does importing a package imports its sub-packages as well in java?

975


What are peerless components in java programming?

1019


What is type inference in java8?

1053


Explain how to force the garbage collection in java.

970