answersLogoWhite

0

At any given point of time you cann't get the address of a variables of java program. This is meant for security purpose only.

User Avatar

Wiki User

14y ago

What else can I help you with?

Continue Learning about Engineering
Related Questions

Explain reference variable and how it is different from pointer variable?

In JAVA, all variables are reference variables, and there are no pointer variables. Even though the platform may implement them as pointers, they are not available as such. In C, no variables are reference variables. They are a C++ enhancement. In C++ a reference variable is syntactically the same as a pointer variable, except that the use of the indirection operator (*) is implicit. You do declare reference variables slightly differently than pointer variables but, once you do so, they can be treated as non-pointer variables. Reference variables also cannot be redefined once they have been initialized to point to some object. They are const. Structurally, there is no difference between a pointer variable and a reference variable. They are both still pointers. The compiler just makes it easier to treat reference variables and non-pointer variables the same way.


WHAT IS POINTER TO POINTER IN C POINTER?

Pointer in C is Memory Reference. It stores memory address of any variable, constant, function or something you later use in your programming. Pointer basically used to ease the referencing of variables and others or in polymorphism and inheritance.


What is a pointerin c?

Pointer in C are fun to programming.Pointers in C are variables which doesn't stores the value but points to the address where the value is stored.They are used for reference.


What is pointer in java?

There is no concept similar to pointers in Java. Pointers are a feature in C programming using which a programmer can access the memory. This was the cause of major catastrophic programming bugs. The creators of Java excluded this feature just to avoid such catastrophic bugs.


What are the differences between C and Java reference variables?

Java does not have the concept of Reference Variables. We cannot access the memory location where the data is stored in Java.


What is pointers in c?

a pointer is a variable .it specify the address of the particular variable ,the & symbol is to specify the address of the variable.


How are the strings passed to a function?

By reference. The name of the string is converted to a pointer (in C/C++) and given to the function as the address of the first element. (In Java, all objects are passed by reference, and there are no pointers.)


What is a pointer variable in C?

Pointer variables point to data variables. They are mostly used to point to dynamically allocated data variables, but can actually point to anything (e.g. statically allocated variables, array elements, anywhere inside a variable, program machine code, I/O device descriptors, nonexistent memory). Misuse of pointer variables, either unintentionally or intentionally, is a major cause of nearly impossible to debug software problems in programs written in C (and C++).


What is an address in C plus plus programming?

An address in C or C++ is the location in memory of an object or function. An address is the contents of a pointer, as opposed to the contents of the memory location pointed to by the pointer.


What is called pointers-c plus plus?

Yes, C++ has pointers, which are references to memory locations. which are variables that store memory addresses, or NULL (zero). If the pointer is non-NULL, the pointer is said to dereference the object (or variable) residing at the stored memory address, which permits indirect access to that object so long as the object remains in scope.


Define pointer to pointer in c?

Double (**) is used to denote the double pointer. As we know the pointer stores the address of variable, Double pointer stores the address of any pointer variable. Declaration : int **ptr2Ptr;


How do java statements differ from c nd c plus plus?

There's little point in trying to compare Java statements to C statements since C is not an object-oriented language. There are some obvious similarities, however that is only because the Java language borrowed heavily from the C++ language, while C++ evolved directly from C. Other than that, Java and C have nothing in common whatsoever. Java and C++ are both object-oriented languages, however Java is 100% object-oriented. C++ is largely object-oriented, but because it inherits from C it also inherits all of C's fundamental data types such as int, char and, more importantly, pointer variables. Java has none of these -- everything is implemented as an object. One key difference between Java and C++ is that, by default, objects are passed to functions by reference in Java. In C++, all variables are passed by value by default. Although it makes more sense to pass by reference, C++ must retain backwards compatibility with C, which has no concept of references whatsoever (to pass by reference in C you must pass by pointer -- but the pointer itself is passed by value). You can, of course, pass by reference in C++ using C++ references (which C does not support), but it is not by default -- that's the key difference. Another key difference is that in Java all class methods are virtual by default. In C++, all methods are non-virtual by default. In some ways, defaulting to virtual makes a lot of sense and perhaps, with hindsight, C++ would have done the same. It's certainly a lot easier to mark a derived class as final in Java, whereas in C++ you have to manipulate the language to achieve the same end.