Explain the core principles of Object-Oriented Programming (OOP) and how they are implemented in Java.