In which way does a Primitive data type is passed ?

Answers were Sorted based on User's Feedback



In which way does a Primitive data type is passed ?..

Answer / harsha

Primitive data types are 'passed by value'.

Is This Answer Correct ?    8 Yes 1 No

In which way does a Primitive data type is passed ?..

Answer / sandeep

Primitive data type are passed using wrapper classes. This
class provide us an object view of primitive types.
e.x.
Integer i=new Integer(3);

Is This Answer Correct ?    6 Yes 1 No

In which way does a Primitive data type is passed ?..

Answer / subha narayan mohapatra

all Primitive data types are passed by value.

Is This Answer Correct ?    3 Yes 0 No

In which way does a Primitive data type is passed ?..

Answer / sailendra.n.jena

primitive datatype are pass this way
class A
{
int x=7;
void disp(int z)
{
System.out.println(z);
}
}
class Test
{
public static void main(String args[])
{
int x=7;
A a=new A();
a.disp(x);
}
when u pass the primtive reference to this method only
address will transfer to the parameter which i have given
to the void disp(int z).After passing the reference
variable the other variable will pointing to that object &
collect the value of that object.

Is This Answer Correct ?    1 Yes 0 No

In which way does a Primitive data type is passed ?..

Answer / ismail

Primitive data types will passed be "Pass by Value"...!!!

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Core Java Interview Questions

Why would you desing a J2EE application so user data is entered by way of a JSP page and managed by an underlying Java Beans class?

5 Answers   Adobe,


What is meant by Java ?

2 Answers   CMC, Infosys,


What is the purpose of garbage collection in java, and when is it used?

1 Answers  


Difference between final and effectively final ? Why is effectively final even required ?

1 Answers  


What is mysql driver class name?

1 Answers  


What is tcp and udp?

1 Answers  


What is an array and a vector? How they different from each other?

4 Answers  


What is classes in java?

1 Answers  


what is the use of datasource in core java?

3 Answers   Satyam,


What is the entry point in Java, and how is it written?

2 Answers  


Are floats faster than doubles?

1 Answers  


What is string [] java?

1 Answers  


Categories