Search This Blog

save java programs with".java" extension

examples :

helloworld.java
sample.java
match.java
send-mail.java

quick links

" this " key word introduction in java


"this" keyword is used in java fro 2 purposes

1) to access data members inside member functions
2) to call a constructor from another constructor


note :

the keyword " this " must be used in non-static methods only.

it can't be used in static methods.