In the hashmap processed , dont we need to initialise it by providing a new keyword

In the hashmap processed , dont we need to initialise it by providing a new keyword.

yes, we need to do that. if we need to use any object in java, we must instantiate it using new keyword. in this tutorial this initialization have been done in function calling.
while calling hasPath function , we passed new HashMap<>() as a parameter, which is initialization of processed map.
Thanks

please resolve it and rate it if satisfied.
Thanks…

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.