There is no pointers in Java, But how could java solve the problem of Dynamic Memory Allocation ????

[ As we know that pointers in C++ solve this problem ]

Is there a solution WHAT is it ? and HOW to use it ?

Please, explain with Examples...


Thanks in advance.

And what problem would that be? The JVM manages the memory allocation when an object is created and the garbage collector frees that memory when there are no more references to the object. What exactly is your question?

You answered in Ezzaral. He had no clue how you managed memory in java and you told him that JVM does it. A quick Google search also would have probably answer the question.

in java objects are always referred to using "references", which are kind of like pointers in C, except that you can't do silly stuff with them

references are NOT pointers. Don't give bad advice.