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.

Array of String


In Array of String we use array of String data type .We can declare array with size.In above example we use "gre" variable of Array of string type and [3] is the size of an array.
[3] means we can enter only 3 strings not more than 3, If we want to change or extend the values(strings) then we must change the size of an array.We need not change the loop
because here we use length for count the length of string  and this counts the character till ends.

Program of two Dimensional Array

 

In Array the variables store a list of values.Array are of two types… Single Dimensional Array and Multi or two Dimensional Array.In single there is single row with multiple columns or multi row with single column.In Double dimensional Array values are stored in multiple rows or multiple columns.

Syntax…..

Int myarr[][];

myarr=new int[3][4];

 

program for applet life cycle in java

An applet is a window based event driven program and its wait until an event occurs.
Every Java applet inherits a set of default behaviours from the Applet class. Whe an applet is loaded, it undergoes a series of changes in its state .

States are.....

Born State--init()
Running State--start()
Idle State---stop()
Dead State---destroy()

Page 27 of 29

About Us

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