answersLogoWhite

0

What you use in case of pointer in java?

Updated: 8/20/2019
User Avatar

Wiki User

12y ago

Best Answer

Java does not have pointers

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What you use in case of pointer in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
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


What is case in java?

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


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 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 you use pointers in java?

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