Learn package in java.lang Questions Answers format. East to learn.
Some questions for you from java.lang package.
2. How many types of inner classes exist?
Ans: 4 types.
3. What are JAR files?
Ans: JAR file is a zipped file zipped by JVM.
5. How to convert an object to string?
Ans: Object to String – toString()
7. What are wrapper classes?
Ans: Wrapper classes
8. What is the garbage collection mechanism in Java?
Ans: Garbage Collection – gc() and exit(0)
9. How to use the C++ destructor functionality where Java does not support destructors?
Ans: Java Destructor – finalize()
10. What is hashcode?
Ans: String Methods Java – hashCode() Example with Screenshot
11. How to compare two objects?
Ans: Object comparison – hashCode() & equals()
12. What is immutable?
Ans: Introduction – Immutable Nature – Comparison