✅ variables declared with/without the “new” keyword.

What difference does using the word
new
make in the code? even in terms of memory allocations n stuff.

also in this code how many
TrialObjects
objects were created?
TrialObjects testObj1 = new TrialObjects("some string argument1");
TrialObjects testObj2 = new TrialObjects("some string argument2");
TrialObjects testObj3 = testObj1;
Was this page helpful?