Does Java has pointer?

Questions by geek_zubi   answers by geek_zubi

Showing Answers 1 - 16 of 16 Answers

radhi_04

  • Feb 25th, 2006
 

no java does not have a pointer but we can use the new operator

for ex:

the name of the method is firstname

we can create a objectas

firstname f=new firstname

this allocates the memory according to the size of the method firstname

  Was this answer useful?  Yes

mca_udit

  • Feb 26th, 2006
 

hey java provides no facility to use pointers to the programmers.....but i think that in JVM pointers r commonly used..bec it provide the garbage collecter...but all the work on the pointers done internally.......no information to the programmer

  Was this answer useful?  Yes

Java_Guy

  • Feb 27th, 2006
 

No Java doesn't have the concept of pointers

  Was this answer useful?  Yes

bhuvanathiyagarajan

  • Mar 27th, 2006
 

no,java does not have pointer concept

  Was this answer useful?  Yes

anil KALERU

  • Mar 31st, 2006
 

NO java doesn't support pointer concept

Let give me Why doesn't java

  Was this answer useful?  Yes

Rajasekar

  • Apr 3rd, 2006
 

No. java does not have pointers.. thats why java is more secured then other language

  Was this answer useful?  Yes

Java do have pointers; but not similar to the one that C has. In Java, Pointers are in the form of Objects/references. Also the pointers in Java are not explicit like C. probably JVM internally uses pointers. Every object is a reference to a location making it a pointer...these pointers cannot be directly manipulated.

Differences between the C & Java pointers:

1) A pointer is a variable that holds the memory address of data. In Java 
there are only references, which do not hold any memory address, but 
which are indices in a table and this table has then the real pointer to 
the data.

2) Pointer Arithmetic is not possible with Java pointers.

These are my conclusions ...... What u all people think about this?

  Was this answer useful?  Yes

Radhika

  • Apr 3rd, 2006
 

Sharukh,

  Your explanation is very clear of all.

     Thanks,

      Radhika.

  Was this answer useful?  Yes

lincolnkal

  • Oct 21st, 2008
 

Yes, Java definately supports POINTERS . But we are not using them externelly. the Java Runtime Environment (JRE) will take care of it. Generally it always a tough task to use pointers by the users. In order to overcome this Java developers make the pointers that should be used internally.
In Java...,Every time when we create an object ..we have to create them by using " new " operator which is generally used for pointers.....

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions