If the following was introduced as LINE E in the example,
System.out.println(new Account().id+", "+new Account().name);
Is it correct to say that although it will print 111 and "dummy", the 111 and "dummy" are printed from two different Account objects?
[HD Pg 212, Sec. 8.5.3 - invoking-a-constructor]
Moderator: admin
-
- Posts: 221
- Joined: Mon Nov 26, 2018 2:43 pm
- Contact:
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: [HD Pg 212, Sec. 8.5.3 - invoking-a-constructor]
Yes, that would be correct.
Who is online
Users browsing this forum: No registered users and 10 guests