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 ? | 10 Yes | 2 No |
Post New Answer View All Answers
What exceptions occur during serialization?
In the below example, how many string objects are created?
How can we achieve thread safety in java?
Which list does not allow duplicates in java?
What is the main functionality of the remote reference layer?
What is integers and example?
Is null false in java?
What mechanism does java use for memory management?
Is a case study a method or methodology?
What if static is removed from main method?
What is the concatenation operator in java?
Is there any way to find whether software installed in the
system is registered by just providing the .exe file?
I have tried the following code but its just displaying the
directory structure in the registry.
Here the code :
package com.msi.intaller;
import java.util.Iterator;
import ca.beq.util.win32.registry.RegistryKey;
import ca.beq.util.win32.registry.RootKey;
public class RegistryFinder {
public static void main(String... args) throws Exception
{
RegistryKey.initialize(RegistryFinder.class.getResource("jRe
gistryKey.dll").getFile());
RegistryKey key = new RegistryKey(RootKey.HKLM,
"Software\\ODBC");
for (Iterator
What's the base class in java from which all classes are derived?
difference between byte stream class and character stream class?
Define "Access specifiers" in java.