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

What is e java?

1168


Is char a method in java?

1124


What is the format specifier?

988


What is difference between protected and private?

1142


What are anonymous inner classes?

1054


Difference difference paint() and paintcomponent()?

1050


Why is multithreading important?

995


How do you do absolute value in java?

1028


How java is similar to c?

1090


What is the use of arrays tostring () in java?

1071


What type of variable is error flag?

1127


What does file separator do in java?

1075


Can we sort arraylist in java?

1043


Is int primitive data type?

990


What is a nested structure?

1103