About Question enthuware.ocajp.i.v7.-2-.-1138 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
Hamza1
Posts: 7
Joined: Mon Apr 15, 2019 6:37 am
Contact:

About Question enthuware.ocajp.i.v7.-2-.-1138 :

Post by Hamza1 »

creating a new object from a class means to invoke his methods ?? I am confused

Hamza1
Posts: 7
Joined: Mon Apr 15, 2019 6:37 am
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1138 :

Post by Hamza1 »

admin wrote:
Sun Mar 23, 2014 8:27 pm
The line of code is System.out.println( new SubClass() ); so first a new SubClass object will be created and that object will be passed to the println method. The method will then cause the toString method on that object to be invoked.
why?

Hamza1
Posts: 7
Joined: Mon Apr 15, 2019 6:37 am
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1138 :

Post by Hamza1 »

Hamza1 wrote:
Thu Apr 18, 2019 5:28 am
admin wrote:
Sun Mar 23, 2014 8:27 pm
The line of code is System.out.println( new SubClass() ); so first a new SubClass object will be created and that object will be passed to the println method. The method will then cause the toString method on that object to be invoked.
why?
it is clear now for me ,, thanks hhhhhhhh

Post Reply

Who is online

Users browsing this forum: No registered users and 53 guests