In which way does a Primitive data type is passed ?
Answer Posted / 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 |
Post New Answer View All Answers
Is java a digit method?
Explain JMS in detail.
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
What does void * mean?
What is an interoperable application in java ?
What is the base class in java from which all classes are derived?
Explain what do you mean by functional overloading in java?
What is qms certification?
Does java initialize arrays to zero?
Differece between class and generic class?
What are the advantages of java?
Difference between arraylist and hashset in java?
What is foreach loop in java?
Is nan false?
Do extraneous variables affect validity?