These are well tested solutions to common problems that are easily available in most languages. Because it is not good to keep reinventing the wheel - you need reliable, optimised code on which to base your business logic or game etc...
In Java, the standard libraries we've used are Math or in the java.util or java.io packages
java.lang.Math - Useful common maths functions acting on doubles: Math.sqrt(num), Math.pow(base, exp), Math.random()- uniform pseudorandom number in range [0,1), etc...java.lang does not need to be explicitly importedjava.util.Scanner - Input from keyboard (System.in), Files, etc...java.util.Arrays - Includes Search and Sort functionsjava.util.Random - includes more advanced random number functions than Math.random()java.util.Date - for dealing with data/time data and calculationsjava.io.File and java.io.FileWriter for representing and writing to Files