I am curious how many classes are there in Java standard library. Perhaps someone knows an approximate number?
I see 3793 counting interfaces and abstract classes, as well as private classes.
Calculating classes and subclasses is a cumbersome task, but you can know the number of files. 4240 total files in Jdk 8. Click here for the list of all files.
For Java SE 9 , according to the API doc 6005 including abstract and interfaces.
For Java SE 10, according to the API doc 6002 including abstract and interfaces.
https://docs.oracle.com/javase/10/docs/api/allclasses-noframe.html
Method : view source, and count "<li>" html tag with notepad++.
For Java SE 11, according to the API doc 4411 including abstract and interfaces.
For Java SE 12, according to the API doc 4433 including abstract and interfaces.
https://docs.oracle.com/en/java/javase/12/docs/api/allclasses-index.html
Method : view source, and count "colFirst" css class with notepad++
I'm also curious about this topic. I found this:
(source: Java 8 Pocket Guide book by Robert Liguori, Patricia Liguori)
I see 3762 within Java 8 as following
All Classes ( Outer as well as Inner ) , Enums and Interfaces - 3762
All except Inner Classes - 3462
Only Classes ( Outer + Inner + Abstract + Enum ) - 2963
Interfaces - 799
Enum - 93
Moreover , Here is the list of classes / interfaces introduced with each version - http://qr.ae/Q2baW
Source : Head First 2nd edition, Chapter 1, p. 4