answersLogoWhite

0

Java does not have pointers

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

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.


Why java is more preferable than c plus plus?

Becuse there r no use of pointer in java. So we can't think about memory manipulation..............


In which language pointer concept is not used?

Java


Dangling reference in java?

I think you're referring to the C/C++ concept of "dangling pointers." This is when you allocate some memory to a pointer, then deallocate that memory, but don't change the pointer. This causes any attempted use of the pointer to return an unused memory address. There is no such concept in Java, since the programmer has little to no control over how memory is allocated or freed. The closest thing I can think of is if you're using a class such as a Reader, in which you can close the object (Reader.close()) and then still have a reference to it. But in this case (and other similar cases) attempting to use the Reader further will result in an IOException being thrown.


How does java secures the code?

java is securejava uses the pointer internally. programer cannot use the pointer in our program explicitly. due to use of pointers information may be lostex-int *p;int a=56;int b=98;p=&a;p=&b;in above program first time pointer points the a value and in next line p points the b value, so here a information is lost


Why do java consider pointer as dangerous?

programmers are always confused with pointers


Java null pointer exceptions?

A null pointer exception in java comes when you are trying to perform any action on an object that isnt initialized/has a value i.e., is a NULL Value Ex: private String s; //declare a string if(s.equals("test")){ //do something.. } You will get a null pointer in the if condition because you are checking a value that is null which is not allowed..


What is case in java?

Case is used to label each branch in the switch statement in Java Program


What is the use of switch statement in java?

In java, a switch statement is used to simplify a long list of 'if' statements. A switch statement takes the form of:switch (variableName){case condition1; command1;case condition2; command2;...}


How we can get address of variables in Java as pointer variables in C?

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.


What was the court decision in the Pointer v Texas case?

9 votes for Pointer, 0 against


Can NullPointerException be used with ArithmaticException using throws keyword in java?

No. You cannot throw or catch Null pointer exceptions


Can you use pointers in java?

Java does not support Pointers and hence you cannot use it in Java.


Trying to delete uninitialized pointer to object?

You cannot delete an uninitialized pointer, because there is no allocation for the object, and the pointer contains garbage. That includes the case where you attempted allocation and failed, but deletion is safe in that case because a NULL pointer is "safe" to delete, even though it does not point at anything.


Why you use an array of pointer to pointer?

because u freakin can


What is the case for Java keywords?

uppercase


How can you fix uncaught exception java lang Null Pointer Exception on blackberry 8300?

The best way to fix uncaught exception java lang Null Pointer Exception on a Blackberry 8300 is by doing a restart. Shut the phone off and remove the battery for a minute. Replace the battery and turn the phone back on.


What is java's purpose on my PC?

Programs that are specifically designed with Java require a Java runtime to work on a computer. (In the case of Java, the runtime is called "Java Virtual Machine".) If you have any such program, you need to have Java.


Use of double pointer?

A double pointer has two basic meanings. One is ofa pointer to a pointer, where changing the value ofdouble pointer will result in the original pointer being changed. Another is that of a two-dimentional array, such as a matrix, or a list of char* (e.g. in main when you use argv).


How do you choose the version of Java to use with your browser when you have more than one version of Java installed?

Its good practice to always use the most recent version of the respective software system you are trying to run. In the case of Java that means you want to run Java JRE 1.6 for pretty much everything. You also may want to consider removing the older versions of Java as they may conflict with the newer version.