An object that implements the Enumeration interface generates a series of elements, one at a time. It has two methods, namely hasMoreElements() and nextElement(). HasMoreElemnts() tests if this enumeration has more elements and nextElement method returns successive elements of the series.
2
what is an Object?
Ans:
Objectis an instance of a class and it is a software unit that combines a structured set of data with a set of operations for inspecting and manipulating that data. When an object is created using new operator, memory is allocated to it.
3
what is Interface?
Ans:
Interface is similar to a class which may contain method’s signature only but not bodies and it is a formal set of method and constant declarations that must be defined by the class that implements it. Interfaces are useful for:
4
what is Methods ?
Ans:
Methods are functions that operate on instances of classes in which they are defined. Objects can communicate with each other using methods and can call methods in other classes.
5
what is abstract class?
Ans:
Abstract class is a class designed with implementation gaps for subclasses to fill in and is deliberately incomplete.
6
what is super class ?
Ans:
Super class is a class that is inherited whereas sub class is a class that does the inheriting.
7
what is package?
Ans:
Package is a collection of classes and interfaces that provides a high-level layer of access protection and name space management.
8
What is Primitive Data Type?
Ans:
Primitive data types are 8 types and they are: byte, short, int, long, float, double, boolean, char.
9
what are Wrapper classes?
Ans:
The classes that allow primitive types to be accessed as objects.
10
What is Class?
Ans:
Class is a template for multiple objects with similar features and it is a blue print for objects. It defines a type of object according to the data the object can hold and the operations the object can perform.