Java Reference
In-Depth Information
}
Type methodname a (parameter-list)
//body of method
.
.
}
}
Classes are also called the box which defines variable- width, height and depth.
Example
Class box
{
Double width;
Double height;
Double depth;
}
Class that implements stack of data and integer.
Example
Class stack
{
Int stk [] = new int [10];
Stack ()
Tos=-1
}
Void push (int item) {
Search WWH ::




Custom Search