Enumeration is a data type that contains a set of values.
enumeration can be intialised with enum keyword
example
public enum subject{Maths,English,science}
Q2 . What is a vector?
SOLUTION
Vector is like a array data structure that is used to store data and can be traversed through.In vector the data can be added or removed dynamically.
Q3 . what is function overloading?
SOLUTION
Function overloading is a type of polymorphism.In funtion overloading there can be multiple functions with the same name but with different attributes like number of parameters.For example
void func(int a,int b)
void func(int a)
to invoke first fu
Q4 . what is abstraction?
SOLUTION
Abstraction is the OOPs concept in which only the required data is exposed.We can implement abstraction using using access speciefier like pprivate,public,protected.
Q5 . What is overriding?
SOLUTION
It is adding additonal implementation details to members that are already in the base class and are being used with extra details in the child class.
Q6 . what is a collection?
SOLUTION
Collection is a group of separate objects as a single group.There are some collection interfaces and classes
>collection classes are
>HashMap
>TreeMap
collection interfaces are
>List interface
>Map interface
Q7 . What are the types of inheritance in java?
SOLUTION
Inheritance are ways of using the parent class members in child classes.Types of inheritance are
>single inheritance
>multilevel Inheritance
>Hybrid Inheritance
Q8 . What is the type of inheritance java does not support?
SOLUTION
Java does not support multiple inheritnace.We can however implement multiple inheritance using interfaces.
Q9 . What is java Documentation?
SOLUTION
Javadoc comes with Java and is used to generate Java codes documentation in HTML format.
Q10 . How does java code compile?
SOLUTION
Java source code is compiled into java byte code and then the byte code is executed at run time by JVM or java virtual machine.