Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
    Bookmark Topic Watch Topic
  • New Topic

call instance methods from Constructor

 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Report post to moderator
Is a good tehnique to call a instance method (private) from a constructor ?
I think not,the theroy says that the state from my object is not ready till the my construcor was completed -> I try to call a instance method when the instance state is not complete.Is this right ?
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Report post to moderator
I think it's a cross-post... I have post a reply in the SCJP forum... But I have no authority to delete it... :roll:
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Posts: 12056
232
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Report post to moderator
Thanks Ko Ko
Closing this topic. If anyone would like to add comments, you can find an open version here
Regards, Andrew
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!