Need Assistance?

support@tutorialshub.in

Object-Oriented Programming (OOP) Core

this & static Keywords in Java

ADVERTISEMENT
Java Free Lesson
5 min read
ADVERTISEMENT
  • this: Refers to the current object instance—used to resolve naming conflicts between parameters and fields or to chain constructors (this(...)).
  • static: Belongs to the class rather than any single object—shared across all instances (e.g., counters, utility methods). Static methods cannot access non-static fields directly.
ADVERTISEMENT
Hi, I'm Tuby! Here to help you