We can define a validation to validate user input for textfields, password fields etc.If the user entered value does not match the validation pattern, a message appears.
By using a calculator we can calculate arithmetic operations(mathmetical computations) on numbers .Arithmetic operations means addition, subtraction,multiplication, divison etc.
Each square(rectangle) in the chessboard is 20 pixels by 20 pixels.The squares are grey and black.If the row and column are either even or odd, then the color is Grey.Otherwise, change color into Black.
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.