Top 10 Java Classes
Last modified on August 1st, 2014 by Joe.
Thought of compiling a list of classes that are popular among java programmers. Should I say most essential? There is no strict rules for the selection, in fact there are no rules followed. Classes that popped up on top of mind are listed below. You are welcome to add your own list. This list will vary depending on the type of java project you work on. These classes I have listed does not require any introduction and they are as popular as Rajnikanth in java world. Have fun!
- java.lang.String
String class will be the undisputed champion on any day by popularity and none will deny that. This is a final class and used to create / operate immutable string literals. It was available from JDK 1.0
- java.lang.System
Usage of System depends on the type of project you work on. You may not be using it in your project but still it is one of the popular java classes around. This is a utility class and cannot be instantiated. Main uses of this class are access to standard input, output, environment variables, etc. Available since JDK 1.0
- java.lang.Exception
Throwable is the super class of all Errors and Exceptions. All abnormal conditions that can be handled comes under Exception. NullPointerException is the most popular among all the exceptions. Exception is at top of hierarchy of all such exceptions. Available since JDK 1.0
- java.util.ArrayList
An implementation of array data structure. This class implements List interface and is the most popular member or java collections framework. Difference between ArrayList and Vector is one popular topic among the beginners and frequently asked question in java interviews. It was introduced in JDK 1.2
- java.util.HashMap
An implementation of a key-value pair data structure. This class implements Map interface. As similar to ArrayList vs Vector, we have HashMap vs Hashtable popular comparisons. This happens to be a popular collection class that acts as a container for property-value pairs and works as a transport agent between multiple layers of an application. It was introduced in JDK 1.2
- java.lang.Object
Great grandfather of all java classes. Every java class is a subclass of Object. It will be used often when we work on a platform/framework. It contains the important methods like equals, hashcode, clone, toString, etc. It is available from day one of java (JDK 1.0)
- java.lang.Thread
A thread is a single sequence of execution, where multiple thread can co-exist and share resources. We can extend this Thread class and create our own threads. Using Runnable is also another option. Usage of this class depends on the domain of your application. It is not absolutely necessary to build a usual application. It was available from JDK 1.0
- java.lang.Class
Class is a direct subclass of Object. There is no constructor in this class and their objects are loaded in JVM by classloaders. Most of us may not have used it directly but I think its an essential class. It is an important class in doing reflection. It is available from JDK 1.0
- java.util.Date
This is used to work with date. Sometimes we feel that this class should have added more utility methods and we end up creating those. Every enterprise application we create has a date utility. Introduced in JDK 1.0 and later made huge changes in JDK1.1 by deprecating a whole lot of methods.
- java.util.Iterator
This is an interface. It is very popular and came as a replacement for Enumeration. It is a simple to use convenience utility and works in sync with Iterable. It was introduced in JDK 1.2
Did I miss your favourite?
beautiful
Great thought to list out Top 10 classes.
very good joe….
very nice
the only blog that have lot of stuff for the learner is JavaPapers
I have been reading all your blogs. Very good one. Simple but powerful explanation. Thanks a lot. Keep going. :)
great work!!! ;)
Very well :)
Good content with well understandable
Sanjay
Great Job Joe,
we are using, but not pointed.
Simple but great Knowledge Transfer from ur blog.
Nice work Joe…… :-)
Keep Go on……
Very Good friend..
please write for advance java as well like hibernate spring etc.
very nice,
now I know who Rajnikanth is :)
Very Good.Pls post some topics on spring & hibernate…
Hi Sir,
Very nice explanation. If you have time Can you please explain what exactly difference between Encapsulation and Abstraction with an example.
Brilliant. I would be including java.util.LinkedList too.
Neenga room pottu yosipengalo..?
one doubt, is Class is the direct subclass of Object ?
I dint see any extend keyword used in Class to extend Object ?
Pls clear my ignorance
@Dinesh, Object is superclass of all java classes. In that way it is a superclass for ‘Class’ also. This will not be given explicitly in source code as extends.
Good One
buddy….. u r an excellent java guru…..every body can become a master by reading just ur blog….great brother…carry on….. would like to become java master in the universe like rajani kanth…..lolz…..
brother…kindly send the the link of ur blog for J2EE too !!! its request from myside
hallo sir i’am deepak, i’m new for JDBC actually i’m facing connectivity problems after making dsn for MS Access database. i am using win7 64-bit…!!
plz provide me solution …
thank you…
Thanks for sharing
I guess we can add ClassLoader to the list
How about org.slf4j.Logger? Everybody uses logging nowadays.
Would love to see a statiscal based approach for this as a comparison. Obviously it would hard to classify Object and class
Good one Joe…
java.util.Collections
Thanks Ganeshji. Privileged to have you comment here.
good… very informative
Nice one
Really superb Mr Joe…. Thanks lot to share your knowledge with us…
bcoz I did a lot of number manipulation
i would put j as wellava.lang.Math
Thanks for this site it’s very beneficial for all Java developers….
This is simply fantastic. It helped me a lot. Keep up the good work. Many people are getting benefited from this.
Its very simple to understand
Great Job Mr Joe
Superb Joe,
Very Good topic and easy to understand..
Hello Joe,
Also provide the detail information like methods,properties etc. for these classes.
ThankYou So much for knowledge sharing.
Great job Joe.
Thanks for your such a gr8 effort.
nice post ….
Hi Joe
Excellent information has given your blog. please explain the encapsulation and abstraction.
Hi Joe
Excellent information has given your blog. please explain the encapsulation and abstraction.
Nice Joe…Good….Expecting more from you..
Can you please explain about some of the frameworks which is most used in projects.
hi Joe,
I guess StringBuilder/StringBuffer should be there too, must people use String where they should be using one of those two. String is inmutable, any time you assign text to an instance of String, you a creating a new object, leaving previous object orphan, until the scavengers of the gc wipe it out, and probably memory leak probs.
Anyway, u have done a great job here !
Thank you sir.
Rajnikanth is master in acting,
your master in java……..
Great blog, Loved it. Pls keep on posting. Thanks
java.class does not have constructor the how it will load and initialize the objects?can u please clarify me?
good work boss
Good
Good thought process
very good explanation, i liked it
thanks, your site is very neat and beautiful
Great Job Dude,post more articles on Threads,Collections.
what is the default access specifier, if we dont mentioned while declare the class
Good one…..
Ok Good,i appriciate you
I think u may missed java.io.*; this is one of my fav class…
Thanks for your knowledge
Excellent is just the preface!! Kudos Joe!
Thanks a lot
keep posting
god bless you.>>>
Hi Joe,
Where do you get the images ?
It seems there is a lot of hard work behind your blog. keep up good work bro.
nice…too much helpful to me..thanks..
Wrapper classes should be there for sure.
very useful :)
very useful
good
nice,VERY USE FULL…JOE
Thanks ……………JOE
Great work, thanks
Kindly Explain System.out.println() function i.e what is System, out and println what is their relationship
@Aravind,
Its here:
https://javapapers.com/core-java/system-out-println/
nice work. thank u sir
ur site looking nice bayya
Dear Joe, All your posts are quite interesting and easy to understand.
I am new to core java … yet learning basics of core java. As of now I am trying to understand the java.io package, serialization, and generics.
Can you please help me understand the above said for a fresher point of view?
Thanks in advance.
the way simple look of your blog and explanations get u lot of fans.. keep it up.
Thanku sir .very easy to understanding
Nice list of top 10 java classes.
Top 3 interfaces
1)Serializeable
2)Comparable
3)Cloneable
thnQ u joe
Very nice…
Good. However, you missed an important one java.io which will be used for all your I/O. I don’t think any program can run without this class.
Hi joe,
All your posts are quite interesting. Please can you post tutorials regarding XML.bcz now a days it is very useful technology…do needful.
Thanks,
Koduru.Rajender reddy.
I would like to replace Date with Calendar and numbered at 3 or 4 :-)
Really nice work Joe… Nice article for learners… Thank you :)