Predefined libraries in Java
Java's strongest plus is it offers many pre-defined package libraries(class and interfaces) which can be used by developers for efficient coding.
Developers can use these libraries to easily convert their creative ideas to application form.
These predefined package libraries are bundled in the form of JAR's and are kept in lib folder of JDK(eg. C:\Program Files\Java\jdk1.8.0_77\lib ) or JRE root directory.
We can directly import any class or interface of library in our program if PATH variables or environmental variables are set correctly pointing to JDK.
You can refer Packages in Java to know how to import a class or interface of a package.
Important classes inside these libraries
- String class - used for storing, processing and managing words or group of words
- Math class - used for difficult mathematical operations(eg for finding absolute values).
- IO class - used for getting input from file, console and output maipulations.
- Threads - used for parallel processes which does not depend on one another.( eg tabs in browsers)
- Collections - used for storing and accessing a group of data's easily.(eg stack, queue)
- AWT - used for creating UI based applications for Windows (eg. Buttons, Navigations)
- Swing - used for creating UI based applications. Platform independent.
- SQl - used for storing data's in database for later use.