Talk:Java Programming/Reflection/Accessing Private Features with Reflection

how to prevent reflection to access privated methods and members in java classes?

— You first learn how to ask a question. A question like this starts with "How do I", "How would one" or "Is it possible to", instead of "how to". As for your question: You don't. At least not directly - you can however dive into Java's Security Manager, which is consulted before reflection is executed.