Java - Java.lang Class Questions and Answers
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
22. What does the instanceof operator check?
- Object type
- Object value
- Object size
- Object class
23. Which package contains the Object class?
- java.lang
- java.util
- java.io
- java.core
24. What is the purpose of the Class class?
- Runtime class information
- Object creation
- Memory management
- String operations