What is the difference between abstraction and encapsulation in Java? Write a Java program to print a right-angled triangle pattern of stars. Explain the four pillars of OOP. What is the difference between == and .equals() in Java? Explain the concept of method overloading and method overriding. What are access modifiers in Java? Write a program to reverse a string without using built-in methods. What is the difference between an interface and an abstract class? Explain the working of a for loop in Java. How do you connect Java with MySQL using JDBC?