top of page
Search

LIBRARY CLASSES (JAVA)

The java programming supports different type of classes as User defines class. In this article we will describe Library Classes in Java

Java is an object oriented programming language, so in java programming, main two features are supported that is class and object. Basically we know that class is collection of objects and object is an instance of class. The uses of the java libraries of class spread the programmer efficiency by allowing computer programmer to focus on the functionality unique to their job. The library classes are generally planned with some typical usage pattern in observance, and the performance may be suboptimal if the actual usage differs. We deliver an approach for rewriting applications to use different customized versions of library classes that are generated using a combination of static analysis and profile information.

The java programming supports different type of classes as User defines class [A class which is created by user is known as user defined class.] and also there are some classes available with java system that provide some important support to the java programmer for developing their programming logic as well as their programming architecture with very smooth and very fine way. These classes are called Library Classes. In Java support thousands of library classes and also each class contains various types of functions. The availability of a large numbers of libraries of standardized classes is a vital reason for popularity of Java as a standard programming language in modern software world. The use of class libraries grows for the programmer productivity by allowing programmers to focus on the characteristics for that are unique to their application without being burdened with the unexciting task of building and debugging of the standard infrastructure. This java library classes are often designed and executed with some typical usage pattern in real life job profile.

The common case of unnecessary overhead occurs when single-threaded applications are used by library classes that are modified with multi-threaded clients in concept. For example, we find out that many Java programs frequently concatenate with strings via calls to the synchronized method/function like java.lang.StringBuffer.append()[Java compiler translate using +- operator on String manipulated objects is called StringBuffer.append()]. This points show that a lock must be developed for each call to this method, which is unnecessary for single-threaded applications. The performances of the programming concept can better-quality in such cases by rewriting the application to use convention, unsynchronized String Buffers.

Some major advantages present in java library classes are following.

Advantages of Library Classes in Java:

  • The type constraints are used to control where the java library classes can be replaced with routine versions without affecting type perfection of programs.

  • Static analysis is then used to control those applicants for which unused library functionality and synchronization can be removed safely from the allocated types.

  • The profile data is collected about the usage features of the customization candidates to determine where the allocation of custom library classes is likely to be cost-effective.

  • To base on the static analysis results and the profiling information the custom library classes are automatically generated from a template.

  • The bytecode of the client application is rewritten to use the generated custom


List of Library Classes in Java:

Java.io Use for input and output functions.

Java.lang Use for character and string operation.

Java.awt Use for windows interface.Java.utilUse for develop utilityprogramming.

Java.applet Use for applet.

Java.net Used for network communication.

Java.math Used for various mathematical calculations like power, square root etc.


Process to Input/Output operation in JAVA:

Java languages do not provide specific statement to input a value from the keyboard or to print the result on the visual display unit [VDU]. It uses the functions read() to accept a character from the keyboard and print() or println() to display the result on the screen. To input a character the function can be written as shown below:

a= System.in.read();

The Sytem.in.read() is an input stream belonging to the system class, which is, in turn an object of the input stream class available in Java.io Package.

To print the result the print function can be written as shown below:

System.out.print(x);

Here, System.out is an output stream of a system class, which is in turn an object of print stream class available in Java.io library package. Print stream class allow the users to display the result either by using print() or println() function.

EXAMPLE 1:

import java.util.*;

class WordUtil

{

public static void main(String[] args)

{

Scanner input=new Scanner(System.in);

System.out.println("Enter Word: ");

String word = input.next();

char ch=word.charAt(0);

String newWord=word+Character.toString(ch);

System.out.println(newWord);

}

}


Conclusion

So, from the above data we can find that the Library Classes in Java is totally very much important to us for developing a nice and standard software programming. The upper methods are very much helpful for all java programmers




 
 
 

Recent Posts

See All

Comments


Contact

CONTACT:

8908646121(WHATSAPP)

7978531427(CALL)

  • Black Facebook Icon
  • Black Twitter Icon
  • Black Instagram Icon
  • Black YouTube Icon

© 2023 by Personal Life Coach. Proudly created with Wix.com

Thanks for submitting!

bottom of page