Rectangle can be drawn by using drawLine() method. With this method, only the outline of the rectangle is drawn using Graphics object(Graphics gra)color but of the rectangle is not filled with this color. To draw a filled rectangle, the graphics class provide the fillRect() method.
Finally blocks are executed once the try block exits. This block executes even after the unexpected exceptions has occurred. Irrespective of the try block, the expression in finally block is always executed. This block is in-built with the capability of recovering loss and preventing leak of resources. On closing and recovery of a file, the expression should be placed in the finally block.
Multi-level inheritance was introduced to enhance the concept of inheritance. When a subclass is derived from another subclass or derived class, it is known as the multi-level inheritance. In multilevel inheritance, the subclass is the child class for its super class is the subclass for another super class. Multi-level inheritance can go up to any number of levels.
Array can also be passed to the function. To pass an array, you need to specify the name of the array and the size of the array in actual arguments. The corresponding formal arguments will also have array with two subscripts, size of first subscript can be omitted, a variable to hold the row size and a variable to hold the column size. The three arguments in the actual arguments list.
In this example we use arrays(one dimensional array). Arrays are declared in the same as simple variables, but the difference is that each array name must be accompanied by a size(aa) specification using subscript.
A tree component is paired with some other component. When we selects tree nodes, some information shows up in another window.
sound()is used to make a sound in a program. textattr() method is used for colourful characters.We can display Colourful Characters in TextMode and play sounds of random frequencies.
Storage class is a characteristics of possession by a variable in C. The storage class of a variable determines the nature of the variable. Whenever you declare a variable, specify the storage class and data type of variable. C language supports four types of storage class 1)auto 2)register 3)static 4)extern
The switch statement is a multiway decision making statement which selects one of the several alternatives based on the value of integer variable or expression. Switch statement requires only one arguments, which is then checked of case options.Break statement is essential use with switch statement because it stops the execution of succeeding cases and transfers the control out.
JButton is a Swing Component which defined in package javax.swing.*;This program helps to change the Label(Caption) of the Button.The label of the Button “New” is changed into “Save” .