Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find a list of the Java Standard libraries?

Tags:

java

I am new to Java and trying to learn more about it. I studied the documentation and found the following for Java,

Java Docs

Are the packages listed here the same as standard libraries?

like image 824
Alan2 Avatar asked Jun 03 '12 08:06

Alan2


People also ask

Where are the Java libraries?

The Java Class Library (rt. jar) is located in the default bootstrap classpath and does not have to appear in the classpath declared for the application.

Does Java have a standard library?

Yes, that is the standard library.

How many libraries are there in Java?

Apache Commons comprises 43 modular libraries covering domains like Collections, Math, Classes, Database, Caching, I/O Utils. It is widely used in the industry and almost the unofficial Java Standard library enhancement.


1 Answers

Yes. That is the library that Java's creators have provided.

here is a list of things to know:

  • java.lang is for all the basic classes that are actually imported automatically (implicitly) because it is all the basic ones (String, Integer, Double, etc)
  • java.util contains all your data structures you learned in school and more. Read the documentation, and the more you know and practice, the better
  • java.io for file reading. Look into java.util.Scanner for simple file reading, but for any more complicated, low level file reading info, use java.io, its built for efficiency, while Scanner is for simplicity
  • java.math if you ever need to use arbitrary precision values (built-in in python, not in java)
  • java.net for sockets, connections, etc
  • javax.swing for GUI, which is an extension of the older java.awt

Hope that helps.

like image 152
Kaushik Shankar Avatar answered Sep 20 '22 03:09

Kaushik Shankar