In which way does a Primitive data type is passed ?
Answers were Sorted based on User's Feedback
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 |
Answer / subha narayan mohapatra
all Primitive data types are passed by value.
| Is This Answer Correct ? | 3 Yes | 0 No |
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 |
where do we use init()
Why do we need strings in java?
what is server side caching?
Why are functions called methods in java?
What are aggregate functions explain with examples?
Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).
Explain about java sdk?
What is the difference between overriding & overloading?
Difference between hashCode() & equals()?
how to crate clint-server socket?
1 Answers Accenture, Infosys, Infotech, TCS,
Java.util.regex consists of which classes?
What are the uses of synchronized keyword?