Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

this Keyword Java

class Main {
    int instVar;

    Main(int instVar){
        this.instVar = instVar;
        System.out.println("this reference = " + this);
    }

    public static void main(String[] args) {
        Main obj = new Main(8);
        System.out.println("object reference = " + obj);
    }
}
 
PREVIOUS NEXT
Tagged: #Keyword #Java
ADD COMMENT
Topic
Name
5+1 =