CodesJava

Easy learning with example program codes

What is this in java?


this is a keyword in java which refers to the current instance of the class. Every constructor and all non-static methods in java have this as an implicitly parameter.

Note: When n numbers of parameters are passed in a method then from JRE point of view n+1 number of parameters are passed in the method. One additional parameter is this. If this keyword is used in constructor or method then this must be the first statement. 

Read more

 

Sign Up/ Sign In
Ask a Question


Copyright © 2018 CodesJava DMCA.com Protection Status SiteMap Reference: Java Wiki