Tuesday, November 29, 2011

Why pointers are not used in java?

The Java Language the referencing and dereferencing of objects is handled for you automatically. Java does not allow you to manipulate pointers or memory addresses of any kind. It does not allow you to cast object or array references into integers and It does not allow you to do pointer arithmetic. It does not allow you to compute the size in bytes of any primitive type or object. There are two reasons for these restrictions: :Pointers are a notorious source of bugs. Eliminating them simplifies the language and eliminates many bugs. Removing pointers allows Java to provide the security guarantees that it does. :Pointers are not used in java,why because java is a platform independent language and also it is a one type of internet based language.:1.To avoid confusion for the programmer.:Pointers is eliminated in java because pointers concept are complecated for the programmer.pointers are not secure,it generates virus.:Pointers concept is in java but with a minute application. If u observe the stack n heap concept is based on pointers. Pointers arn&
Category:Java Interview Questions

No comments:

Post a Comment