Because pointers are unsafe. Java uses reference types to hide pointers and programmers feel easier to deal with reference types without pointers. This is why Java and C# shine.
pointers are unsafe. pointers are complecated and difficult to use.if we use these concepts that the some of the features are not correct.so java soft designed like this.
Note:If any one want java materials like e-books,faq's send a mail to my id.if any doubts regarding java send a mail to my id, if possible i will send answers.if any one want how to install java softwares ,tomcat,weblogic,eclipse,jbuilder etc and how to use plz send amil or ask online also i will definitly tell. see my profile by clickon below link:http://in.geocities.com/bora_srinivasarao/MyHomepage.html
t's a common misconception that Java has no pointers. It's not exactly true. Java has pointers, they're just not explicit. Every object is a reference to a location making it a pointer... you just can't manipulate the pointers directly.in Java pointers are used by passing refference not by passing address directly ..
A lot of this content is not accurate, so let me set the record straight here.
The Java language does _not_ provide pointers. Instead, all objects are handled by references, not to be confused with pointers or C++ references. The difference is that Java references do not refer directly to the memory location, but rather contain the pointer to the actual memory location, which the programmer cannot get direct access to. This extra level of indirection is required for GC to work. When GC kicks in and frees objects, that are no longer in use, it then does heap compaction to defragment the heap. To do this, some objects must be moved around in memory. This is possible because there is only one place where this pointer is located, in the reference, and thus the memory can be relocated, old location freed, and pointer changed. In C++ this is not possible because pointers are copied all over the code.
It is also true that pointers are dangerous and lead to memory leaks, memory corruption, invalid memory access, e.g. from uninitialized and improperly initialized variables, indexing out of bounds, and many bugs due to pointer arithmetic. References, and other features related to these, avoid all these problems.
Java Language does not use pointer for the reason that it works on Internet. Applets are used on the internet. and Pointers are used to identify the address of variables,methods, and therefore even big programmer can find out the secrets of other user on the internet using pointer. so if there could be pointer in java, it could be harmful for leakage of the important information.