Posted in Uncategorized

Java Post #6 Java Libraries ヽ(⌐■_■)ノ♪♬

φ( ̄¬ ̄ヾ)

A standard library in computer programming is the library made available across implementations of a programming language. These libraries are conventionally described in programming language specifications; however, contents of a language’s associated library may also be determined (in part or whole) by more informal practices of a language’s community.
A language’s standard library is often treated as part of the language by its users, although the designers may have treated it as a separate entity. Many language specifications define a core set that must be made available in all implementations, in addition to other portions which may be optionally implemented. 

The line between a language and its libraries therefore differs from language to language. Indeed, some languages are designed so that the meanings of certain syntactic constructs cannot even be described without referring to the core library. For example, in Java, a string literal is defined as an instance of the java.lang.String class. Conversely, Scheme ,another programming language , contains multiple coherent subsets that suffice to construct the rest of the language as library macros, and so the language designers do not even bother to say which portions of the language must be implemented as language constructs, and which must be implemented as parts of a library.


So with respect to Java….Here is a list of things to know:
  • java.lang is for all the basic classes that are actually imported automatically 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
  • for file reading. Look into java.util.Scanner for simple file reading, but for any more complicated, low level file reading info, use, it is 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)
  • for sockets, connections, etc
  • javax.swing for GUI, which is an extension of the older java.awt
Java differs from most other languages in that, the number of classes and interfaces in its standard libraries is very large. Many common tasks, like I might have mentioned earlier, have already been implemented by these libraries.
Advice to beginners(Something I would have liked to give to the me two years ago… *sigh) might include:

  • Don’t be too intimidated by the large number of classes. Some are used often, but most are used relatively rarely.They are basically logic dependant and implementation oriented.
  • The most widely used packages are java.lang and java.util. You gotta learn them…and fast!!! Given that you want to make java as your main language…
  • For graphical applications , see the Swing classes (javax.swing, and so on).
  • For server applications, see the servlet and Java Server Page APIs.
  • For other packages, you should skim through their documentation just to get an idea of what is available. Later, when a specific need arises, you will often know which packages might be helpful.
So does Java support additional libraries…besides the plentiful ones mentioned in the Java Docs …

Well of course it does… But not as confusing as the Pythonian ones… And this is purely due to the awareness and the more than necessary credibility given to the discussed language… *sigh

Of course there are loads of them…In order to group them … I have divided
  • Database                                         JDAL, SQL2o, JDBI
  • Web Applications                          JWT, Spark

And loads  more that I am letting go unnoticed for no particular reason…


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s