/*An interface is basically a kind of class. The difference is that interface define any abstract methods and final fields(datamember or data functions). Interfaces do not specify any code,we can declare methods and data fields contain only constant. Therefore, it is the responsibility of the class that implements an interface to define the code for implementation of these meathods.
setw() is the I/O Manipulator which is used to sets the width of the fields.
#include<iomanip.h> header file is used for manipulators.
It takes the size of the field(in number of character)as parameter.
The value given to the final variable will not be changed and the value given to final variable must be given at the time of declaration.
If a class can have a constructor to set things up, it should also have a destructor to destruct the object.A destructor is also a member function like constructor whose name is the same as the class name and can be defined like any other member function.Tilde('~') symbol is used for destruct the object. A destructor takes no arguments, no return types. A destuctor cleanup the storage(memory area of the object). The symbol('~')refers to a NOT means destructor is a Not Constructor.A constructor initializes an object and a destructor deinitializes an object.
Convert Double object to String object means we can convert double value into string.Here “str” is the variable of string type and dObj is of double type ,we input the value in double but retrieve by using str variable.
"WESTERN CALENDER OR CHRISTIAN CALENDER" is the other name of GregorianCalendar. In GregorianCalendar year is divided into twelve months(Jan,Feb,March.....) SAME AS ANY OTHER CALENDER.If we talk about international then
this calender is mostly used.This calender is used to find Month, Year, Day in a year.
A constructor is a member function of a class that is automatically called, when an object is created of that class.It (the constructor) has the same name as that of the class’s name.A constructor that accept no parameter is called default constructor.
There are two types of threads
- User Threads
- Daemon Threads
CONTROL FLOW AND ITERATION
The control structures in Java are largely the same as C or C++ with a few exceptions. For one, there is no goto statement. Another difference is that break and continue can take a single argument, indicating which of a set of nested loops they refer to. The loop must have a label which is used as the argument(parameters).
This is clear in above Example…..
Just like any other function, the constructor of a class may also be overloaded so that even with different
number(one argument or more) and types(data types) of initial values, an object may still be initialized.