Java cannot support multiple Inheritance means we cannot create multiple super classes or we can say parents classes or base classes .This is the main reason we can create interface. In interface we can declare function only but not create the body.
Graphics is one of the most important feature of Java.Java applets can be written to draw lines.arcs,images and text in different fonts and styles. Different colors can also be display. The origin of each window at the top-left corner and is(0(x),0(y)). Coordinates are specified in pixels.
The for loop, as in C, repeats statement or blocks of statements some number of times until a condition is matched or fulfill(complete). For loops are basically used for simple iteration in which you repeat a block of statements a certain number of times and then stop. But you can use “for” just any kind of loop.
# define is used to make definition in a C program.Here we define a
constant MAX with its value 12, whenever program encounters Max, it
is replaced to 12. Do not speak for itself, what it is, but from MAX.
Free Flowing Switch statements are executed if we don’t use break statement, if we use break then it will gives output only one case. But we don’t write break then this will gives output Of all the cases with default case.Break is used to terminate the statement.
/*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.