← Back to 14. Protection

📝 Language based Protection in Java

📖 From Operating System • 14. Protection • 21 questions available

Practice MCQs for Language based Protection in Java. Test your knowledge with carefully crafted questions across easy, medium, and hard difficulty levels.

🔄 Last updated: 2026-07-27

5
Easy Questions
10
Medium Questions
6
Hard Questions

📝 Sample Questions

Q1. Which Java feature automatically checks that an index used to access an array is within valid bounds?

🔹 A. Bounds checking
🔹 B. Type erasure
🔹 C. Garbage collection
🔹 D. Autoboxing

💡 Difficulty: easy | ✅ Correct: A

Q2. You have a custom class loader that loads untrusted classes. To prevent these classes from opening network sockets, which permission should be omitted from the policy granted to the loader?

🔹 A. java.net.SocketPermission \*\
🔹 B. java.io.FilePermission \*\
🔹 C. java.lang.RuntimePermission \exitVM\
🔹 D. java.security.AllPermission

💡 Difficulty: medium | ✅ Correct: A

Q3. A Java program loads a plugin JAR signed by a different certificate than the main application. The plugin tries to invoke a private method of a class in the main application. Assuming both are loaded by separate class loaders, which statement is correct?

🔹 A. The call succeeds because signatures match
🔹 B. The call fails due to access control checks on the declaring class
🔹 C. The call succeeds because private methods are always accessible via reflection
🔹 D. The call fails only if the SecurityManager is disabled

💡 Difficulty: hard | ✅ Correct: B

⬆️ View all questions in the quiz below

🔗 Related Topics

📝 Goals of Protection in Operating System📝 Principles of Protection in Operating System📝 Domain of Protection in Operating System📝 Domain structure for protection in Operating System📝 UNIX example of protection in Operating System
🚀 Start Quiz 📝 Practice Mode