new Solution().method3(); Does it create a new Object? But any object need to have a reference ... Have we study it yet? googled so its the same as Solution refname = new Solution(); refname.method3(); but it runs only once and dies after?
What it does?
You must be signed in to leave a comment
22 November 2019, 21:32
That is just an object creation and calling a method on said object. Take these 2 snippets as example, which do the same exact thing:These two snippets are identical except that in the second one I don't create a BufferedReader variable to reuse. You can copy+paste them both in to test.