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

What is jit compiler in java?

0 Answers  


What is your platform’s default character encoding?

0 Answers  


Can a final variable be initialized in constructor?

0 Answers  


What is difference between length and length() method in java ?

0 Answers  


what is meant by Garbage collection?

0 Answers   Cap Gemini,


What is data member in java?

0 Answers  


Can private method static?

0 Answers  


Define a package.

0 Answers  


Can we restart a dead thread in java?

0 Answers  


how a programmer confirms that the data submitted has been succesfully inserted into the database(either oracle or my sql).. How a programmer confirm if there is any problem with the program he wrote for insertion... ANS:--- >executeupdate method is having boolean return type, if anything goes wrong in data insertion or data updation, it would return false. otherwise, if it successfully inserts data into the database, it would return true NOW HOW TO I CHECK IN MY DURING EXECUTION WHETHER IT RETURNS TRUE OR FALSE... WELL IT WILL DISPLAY ANY MESSAGE OR NOT

0 Answers   Google,


how do you store phone numbers using java collections

5 Answers   Bosch, IBAB,


What is the driver class?

0 Answers  


Categories