Final Variable

 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.

Destructor

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.

Double converted to String

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.

find out current day,month,year and time

 

"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.

Default Constructor

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.

Daemon Thread in Java

 

There are two types of threads

  • User Threads
  • Daemon Threads

Control flow and Iteration

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…..

Constructor Overloading in c++

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.

Constructor Overloading

 Constructor means the name of the class and function are same. Constructor with argument and without arguments are called constructor overloading.They do not specify a return type and not void.

Computing Power of 2 using for loop

 In For loop, three actions are performed that is initialization, condition, Increment/decrement.
This is the main feature that are not found in any other loop.

Page 27 of 30

About Us

Rekha SetiaRekha Setia is a passionate blogger of Extra Computer Notes. if you have any ideas or any request me @