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 ? | 9 Yes | 2 No |
Post New Answer View All Answers
What is the base class in java from which all classes are derived?
Why use string handling in Java?
What is difference between module and function?
Can we use catch statement for checked exceptions?
What is return in java?
what is enumset?
Explain the transient field modifier?
Explain about version control?
Objects or references which of them gets garbage collected?
Can we create constructor in abstract class ?
Explain about OOPS concepts and fundamentals.
Is math an abstract class in java?
How many types of assembly languages are there?
What does provide mean construction?
What do you mean by Function Overloading in java?