OOPS and Core Java Interview Question and Answers

5. What is a class?
  A class describes all the attributes of objects, as well as the methods that implement the behavior of member objects. It is a comprehensive data type which represents a blue print of objects. It's a template of object.
 
Your Name Your Email-ID
Your Answer
6. What is an object?
  It’s a basic unit of a system. An object is an entity that has attributes behavior and identity. Objects are members of a class. Attributes and behavior of an object are defined by the class definition.
 
Your Name Your Email-ID
Your Answer
7. What is abstraction?
  Abstraction is an essential element of Object Oriented Programming (OOP). It refers to the act of representing essential features without including the background details or explanations.
 
Your Name Your Email-ID
Your Answer
8. What are the simple types of data used in Java?
  Java has eight simple types of data.
  • byte
  • short
  • int
  • long
  • char
  • float
  • double and
  • boolean
These 8 types can be put into four groups:
  • Integers – It includes byte, short, int and long.
  • Floating point numbers – This group includes float and double.
  • Characters – It includes char.
  • Boolean – This group includes boolean, which is a special type for representing true or false values.
 
Your Name Your Email-ID
Your Answer
12345678910 Page 2 of 10