Can you access a private method from another class in Java?
You can use reflection to call a private method from another class.
Yes, reflection can be used to access private methods, but it violates the principles of encapsulation.
Can you explain how reflection works in this case and what might be the potential risks?