Java - Java.lang Class Questions and Answers

Take Exam

The Java.lang Class questions with answers topic is a key area in Java programming questions and answers asked in major technical exams and placement tests. The java.lang package forms the foundation of Java, offering essential classes like Object, String, and Math. Understanding these concepts is vital for cracking programming interview questions at companies like TCS, Infosys, and Accenture. In this section, we’ll explore frequently asked questions about java.lang classes, constructors, and methods with detailed explanations to help you master core Java fundamentals and boost your placement preparation.

Java - Java.lang Class

Showing 10 of 24 questions

21. Which class is used for dynamic string manipulation?

  • StringBuilder
  • String
  • StringBuffer
  • Both StringBuilder and StringBuffer
Show Answer Report

22. What does the instanceof operator check?

  • Object type
  • Object value
  • Object size
  • Object class
Show Answer Report

23. Which package contains the Object class?

  • java.lang
  • java.util
  • java.io
  • java.core
Show Answer Report

24. What is the purpose of the Class class?

  • Runtime class information
  • Object creation
  • Memory management
  • String operations
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test