C | C++ | Java Interview Questions and Answers - 2
Question: 6
What are wrapper classes?
Wrapper classes are classes that allow primitive types to be accessed as objects.
Question: 7
What is the difference between integer and int?
Integer is a class defined in the java.lang package, whereas int is a primitive data type defined in the Java language itself. Java does not automatically convert from one to the other.
Integer can be used as an argument for a method that requires an object, whereas int can be used for calculations.
Question: 8
What is unicode?
Unicode is used for internal representation of characters and strings and it uses 16 bits to represent each other.
Question: 9
What are the drawbacks of inheritance?
Since inheritance inherits everything from the super class and interface, it may make the subclass too clustering and sometimes error prone when dynamic overriding or dynamic overloading in some situation.
In addition, the inheritance may make peers hardly understand your code if they don’t know how your super class acts.
Usually, when you want to use a functionality of a class, you may use subclass to inherit such function or use an instance of this class in your class.
Question: 10
What is casting?
Casting is used to convert the value of one type to another.
- Java Interview Questions and Answers
- Top 1000+ Java Interview Questions and Answers Pdf
- Top 500+ Advanced Java Interview Questions 2020-2021
- Java Interview Questions and Answers for Freshers Pdf
- Java Interview Questions and Answers for Experienced Pdf
- Java Programming Basics Interview Questions
- Java OOPS Interview Questions for 3 years experienced
- Basic Java Programs Asked in Interview with Answers Pdf
- Java Programming Interview Questions and Answers
- C | C++ | Java Interview Questions and Answers
Dairy and Food Engineering MCQ Questions Pdf More
Nuclear Physics Questions for Class 10 with Answers Pdf More
Samacheer Kalvi Class 10 Science Nuclear Physics Questions More
Class 10 Science Acoustics Exam Questions & Answers Pdf More
Samacheer Kalvi Class 10 Science Acoustics Questions & Answers More
1000+ Railways Airports Docks and Harbour Engineering MCQ Questions More
100+ Area Aptitude Questions and Answers Pdf More
Indian Sports Quiz Questions and Answers More
1000+ TNPSC VAO Study Material in Tamil and English 2023-2024 Pdf More
HCF and LCM TNPSC Previous Year Questions More