New wrote:
I am new to java and was wondering does java have dynamic memory allocation
like in C (malloc, calloc)
Yes and no. As in, yes, Java does dynamic memory allocation and no, it
is not like C.
The main difference is that memory allocated in C with malloc() and
friends must be freed or memory leaks will result. Java has automatic
garbage collection, making it much more difficult to create memory leaks.
Consult your favorite Java text on the new operator.
Ray