• Post Reply Bookmark Topic Watch Topic
  • New Topic

Real time example for Constructor  RSS feed

 
Gopi Arumugam
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am verymuch confuse that how constructor is work. Please you tell any general or common example. No need to go for an Program.
 
Marilyn de Queiroz
Sheriff
Posts: 9082
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Java in General (beginner)
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A constructor is a block of code that is called when a new object is created. In the constructor there is typically code to initialize the member variables of the object or to do other things that need to be done when a new object is created.

Have a look at The Java Tutorial: Learning the Java Language for more information.
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A strangely common error on this site is the mis-use of the term "real time". It has a very specific meaning in computing and using it when you mean "real-world" will cause great confusion. See FOLDOC on "real time".
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!