Changes

Jump to navigation Jump to search
423 bytes added ,  08:42, 2 April 2015
no edit summary
Line 220: Line 220:  
Methods that are executed at the instantiation of a class.<br />
 
Methods that are executed at the instantiation of a class.<br />
 
There can be more than one, diferentiated on the number of parameters that are passed at the instantiation of a class.<br />
 
There can be more than one, diferentiated on the number of parameters that are passed at the instantiation of a class.<br />
 +
[https://github.com/rafahsolis/javaTutorial/blob/master/constructors.java example code]
 +
 +
== static ==
 +
static is used to define class variables and methods.<br />
 +
static objects are referenced by the class, not the instance.<br />
 +
[https://github.com/rafahsolis/javaTutorial/blob/master/staticMethod.java example code]
 +
 +
== final ==
 +
final is used to declare constants. The asignment of value must be at the declaration<br />
 
[https://github.com/rafahsolis/javaTutorial/blob/master/constructors.java example code]
 
[https://github.com/rafahsolis/javaTutorial/blob/master/constructors.java example code]
  

Navigation menu