What is the difference between creating an object with and without "new"?
Example:
Thing someThing = new Thing(); vs.
Path filePath = Path.get("C:\\......) In the first example, I understand that when instantiating the object, that "new" is allocating memory for the someThing object, and that the memory location is referenced by someThing.
My text book says " You create a Path object" by using the second example. Is the difference just how the object is stored or memory is allocated? I am not sure why you would create an object this way.