why pointer is not used in java?

Answers were Sorted based on User's Feedback



why pointer is not used in java?..

Answer / malligontla

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:

Is This Answer Correct ?    14 Yes 2 No

why pointer is not used in java?..

Answer / arun

Java is the language best known for its security
features.Programmer cannot find the physical address of any
variable or object at any case in java and prevents the
programmer or user from accessing the physical address.Hence
if java provide the advantage(disadvantage) of using
pointers in programs there is chance of getting lot of
security flaw, so java does not support pointers.

Is This Answer Correct ?    9 Yes 0 No

why pointer is not used in java?..

Answer / cmadhu2008

Java language have pointer but controlled by itself not to
do any thing by programmer,if it was be available then
security will be break that's why

Is This Answer Correct ?    10 Yes 2 No

Post New Answer

More Core Java Interview Questions

Which is better ascii or unicode?

0 Answers  


Why is singleton not thread safe?

0 Answers  


How do you execute a thread in java?

0 Answers  


ublic class Java_Coding_Samples { public static void JavaHungr(NumberFormatException ae){ System.out.println("integer"); } public static void JavaHungry(Exception e){ System.out.println("string"); } public static void JavaHungry(ArithmeticException ae){ System.out.println("object"); } public static void main(String[] args) { JavaHungry(null); }

1 Answers  


What are parsers? Dom vs sax parser.

0 Answers  


static inner classes means..?

1 Answers  


aabccdee Find the used alphabets as abcde ?

4 Answers  


What is starvation?

0 Answers  


What are the main differences between the java platform and other platforms?

0 Answers  


What is difference between equal and == in java?

0 Answers  


How do you find the absolute value?

0 Answers  


Is array primitive data type in java?

0 Answers  


Categories