java programming

Color Class in Java

Color  It is a standard inbuilt class present in java out package it is used to create color code by using three color code component following are the color constant of color class declared as final an static. 1.  …

java programming

Applet program to show all the events of file cycle

applet program to show all the events of file cycle of applet program < applet code =” my Applet 1.class” Width =300 Height =300> < Applet > Import java applet .*; Import java out .*; Public class my applet extends…

java programming

Life cycle of Applet program

Applet viewer is a standard interpreter that accept, two different types of file that is H.T.M.L. and Java file when applet viewer interpreter reads the instruction form the H.T.M.L. file then it will directly search the applet tag within the…

java programming

Applet Programing in Java

Applet is standard Java application integrated with web application and can run or transport over the numeric word or internet. It is a standard Java interpreter used to interpreter applet tag for generating the applet window. Applet tag:- Syntax :-…

File Handling

  Java provides a feature to perform input out put operation with the file.   Application of file handling:-   It is used to maintain the application data on H D in the form of file. It is used to…

Monitor object and synchronization of thread

When two or more than two threads are accessing common object then such object is known as monitor object or mutex (mutually exclusive object), monitor object always   shares common data in between two or more than two threads. Let us…

Methods of thread class

start ()                          void start ();             start () is non static method of Thread class it is used to start or activate the thread of invoking object. stop ()                                     void stop () ;             stop () is…

Multithreading

Multiprocessing             If two or more than two program runs concurrently by using multiple processors then such concept is known as multiprocessing and each running program is known as process. Multitasking             If two or more than two program runs…

tostring ( ) method of Java language

to string ( ) method Syntax:-             Public string to string ( ); To string is a standard method defined by the Java compiler. Whenever any class contain the body of string ( ) met then Java interpreter access this…

Explain package and import keyword of Java language

 package keyword              package  <pkg1>.<pkg2>.<pkg3>—–<pkgN>;             package is  standard inbuilt keyword of Java language. It is used to assign package (folder path) to any java class. In the above syntax pkg1, pkg2, pkg3—– pkgN are package names.             Whenever any…

Package

Package :  It is collection of more than one class files. There are two types of packages available in Java language as given below. Same package (Default Package)             If the required class files and class file of main program…

Java Interface

Interface             Interface is a keyword of Java language that create block to hold constant and abstract methods.             Whenever any variable or object is declared in interface block then its necessary to initialize the value of that variable or…

String Handling- substring( )

substring( ) Syntax :-    String substring (int index);String substring(int startIndex,int endIndex); Substring() is an overloaded method, available in two version, first version of substring ( ) method of String class is used to retrieve part of string from the…

String Handling – toUpperCase( ) and toLowerCase ( )

toUpperCase( ) and toLowerCase ( ) Syntax String toUpperCase ( );String toLowerCase ( ); toUpperCase() and toLowerCase() methods of String class is used to convert string of invoking object into upper case and lower case letters respectively and returns the…

String Handling – equalsIgoreCase ( )

equalsIgoreCase ( )               Syntax      boolean equalsIgnoreCase (String str); equalsIgnoreCase ( ) method of String is used to compare given string with the string of invoking object by ignoring case. If given string is matched with the string…

String Handling – startsWith( )

startsWith( ) Syntax boolean startsWith(String str);   startsWith ( ) is  standard method of String, it is used to compare the given string with the starting characters of invoking object, if the given string is matched with the starting characters…