why we r not use pointers in corejava?

Answer Posted / arun

First you need to understand the concept of Pointer.
Pointer in C++, gives as reference to object from outside.
if we provide same thing in java, the concept of
Encapsulation will be violate. so java doesn't provide this
feature till 6.0 version. Recently Java added this feature
in java7.0. but they gave different name Clouser, which
give you pointer to function, as Callback in C...

Is This Answer Correct ?    15 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the rules for variable declaration?

507


How do you compare arrays in java?

505


What are the difference between string, string builder, and string buffer in java?

557


What is passed by reference and pass by value ?

586


whatis Home interface and Remoteinterface? with example?

1555






State some situations where exceptions may arise in java?

629


Is array a class in java?

508


What happens if main method is not static?

500


What is lexicographically smallest string?

607


How we can execute any code even before main method?

555


Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?

1030


What is the use of put method?

520


Explain what do you mean by functional overloading in java?

557


What is difference between path and classpath in java?

487


Can abstract class have private constructor?

500