Most Java software development uses a variety of different libraries. We have recently analyzed from 10,000 open source Java projects, extracting the most commonly used Java classes, which come from standard libraries in Java and third-party libraries. Each class is counted only once in the same project, and the first 100 classes are displayed in the following list.
Sort by the most used classes in the following list, and the third value represents the number of items in the 10,000 projects that are used in the class, and the complete list is here.
Java.util.ArrayList (6958)
Java.io.IOException (6866)
Java.util.List (6784)
Java.util.HashMap (5590)
Java.util.Map (5413)
Java.io.File (5097)
Java.io.InputStream (4234)
Java.util.Set (3915)
Java.util.Arrays (3884)
Java.util.Iterator (3856)
Java.util.Collections (3643)
Java.util.Date (3461)
Java.util.HashSet (3278)
Java.io.BufferedReader (3257)
Java.util.Collection (3192)
Java.net.URL (3168)
Java.io.FileInputStream (3044)
Java.io.InputStreamReader (3023)
Org.junit.Test (3008)
Java.io.FileOutputStream (2843)
Java.io.FileNotFoundException (2669)
Java.io.OutputStream (2563)
Java.util.regex.Pattern (2469)
Java.io.Serializable (2437)
Java.util.LinkedList (2372)
Java.text.SimpleDateFormat (2245)
Java.util.Properties (2190)
Java.util.Random (2171)
Java.lang.reflect.Method (2141)
Java.io.ByteArrayOutputStream (2112)
Java.util.regex.Matcher (2012)
Android.os.Bundle (2007)
Java.util.logging.Logger (1999)
Java.io.UnsupportedEncodingException (1968)
Org.junit.Before (1920)
Java.util.Comparator (1896)
Java.io.ByteArrayInputStream (1868)
Java.io.PrintWriter (1862)
Java.util.Calendar (1854)
Android.app.Activity (1843)
Java.net.MalformedURLException (1828)
Android.content.Context (1780)
Android.view.View (1731)
Java.util.Locale (1719)
Java.util.Enumeration (1709)
Java.util.Map.Entry (1705)
Java.io.FileWriter (1677)
Java.io.FileReader (1651)
Android.util.Log (1614)
Android.content.Intent (1601)
Java.lang.reflect.InvocationTargetException (1594)
Java.util.logging.Level (1557)
Java.lang.reflect.Field (1499)
Java.io.StringWriter (1499)
Android.widget.TextView (1442)
Java.util.LinkedHashMap (1409)
Java.io.Reader (1390)
Java.net.URI (1377)
Java.io.Writer (1339)
Java.text.ParseException (1318)
Junit.framework.TestCase (1318)
Java.io.OutputStreamWriter (1295)
Java.io.StringReader (1279)
Java.io.BufferedWriter (1265)
Java.util.Vector (1254)
Java.util.StringTokenizer (1251)
Java.text.DateFormat (1246)
Java.util.concurrent.TimeUnit (1237)
Java.io.BufferedInputStream (1235)
Java.util.TreeMap (1227)
Org.xml.sax.SAXException (1218)
Javax.servlet.http.HttpServletRequest (1175)
Java.io.PrintStream (1168)
Java.util.TreeSet (1160)
Android.widget.Toast (1157)
Java.util.Hashtable (1154)
Java.lang.reflect.Constructor (1139)
Java.net.URLEncoder (1134)
Java.security.NoSuchAlgorithmException (1134)
Org.w3c.dom.Document (1130)
Android.widget.Button (1129)
Org.junit.After (1128)
Javax.servlet.http.HttpServletResponse (1109)
Java.awt.Color (1099)
Java.net.URISyntaxException (1085)
Javax.servlet.ServletException (1081)
Javax.xml.parsers.DocumentBuilderFactory (1076)
Java.lang.annotation.Retention (1075)
Java.security.MessageDigest (1072)
Java.util.concurrent.Executors (1062)
Java.net.UnknownHostException (1057)
Org.slf4j.Logger (1054)
Java.sql.SQLException (1043)
Org.slf4j.LoggerFactory (1042)
Java.util.UUID (1040)
Java.net.InetAddress (1026)
Junit.framework.Assert (1011)
Android.view.ViewGroup (1005)
JAVA.UTIL.CONCURRENT.CONCURRENTHASHMAP (1001)
Java.awt.event.ActionEvent (995)
In the above table, it is not surprising that there are 85 standard libraries for Java, as this is part of the language itself, involving Util, Lang, and IO packages.
The survey is an import statement in the source file, so you don't find a lot of strings, Math, StringBuilder and so on, so it's not necessary to exclude them.