Download Android App in your Android Device from Google Play Store
- Search for "Withoutbook Practice Exam Test" in Mobile/Tablet Play Store
Practice InterviewNew Search by Name or Email

Exams Attended

Make Homepage

Bookmark this page

Subscribe Email Address

Core Java Interview Questions and Answers

Ques 236. Name the eight primitive Java types.

Ans. The eight primitive types are byte, char, short, int, long, float, double, and boolean.

Is it helpful? Add Comment View Comments
Ques 237. Which class should you use to obtain design information about an object?
Ans. The Class class is used to obtain information about an object's design.
Is it helpful? Add Comment View Comments
Ques 238. What is Collection API ?
Ans. The Collection API is a set of classes and interfaces that support operation on collections of objects. These classes and interfaces are more flexible, more powerful, and more regular than the vectors, arrays, and hashtables if effectively replaces.
Example of classes: HashSet, HashMap, ArrayList, LinkedList, TreeSet and TreeMap.
Example of interfaces: Collection, Set, List and Map.
Is it helpful? Add Comment View Comments
Ques 239. Is Iterator a Class or Interface? What is its use?
Ans. Answer: Iterator is an interface which is used to step through the elements of a Collection.
Is it helpful? Add Comment View Comments
Ques 240. What is similarities/difference between an Abstract class and Interface?
Ans. Differences are as follows:
Interfaces provide a form of multiple inheritance. A class can extend only one other class. Interfaces are limited to public methods and constants with no implementation. Abstract classes can have a partial implementation, protected parts, static methods, etc.
A Class may implement several interfaces. But in case of abstract class, a class may extend only one abstract class. Interfaces are slow as it requires extra indirection to to find corresponding method in in the actual class. Abstract classes are fast.
Neither Abstract classes or Interface can be instantiated.
Is it helpful? Add Comment View Comments

Most helpful rated by users:

©2020 WithoutBook