File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Top 20 frequently used java packages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Top 20 frequently used java packages" Watch "Top 20 frequently used java packages" New topic

Top 20 frequently used java packages

krishna balaji
Ranch Hand

Joined: Mar 16, 2006
Posts: 31
i saw API documentation from
there are about 200 packages
can you mention top 20 packages which are frequently used and most important
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46428
Difficult to say which is most important . . .

Some of the more frequently used:
  • java.lang Used all the time. String may be the most frequently used class of all
  • javax.swing
  • java.awt.event
  • java.util
  • In beginners' code, 99% of the API classes used will probably come from those packages.

    Avoid packages whose names start with com.sun or similar; those classes might be changed in the future.
    Don't go through packages reading all the classes, but look for the classes you think you might need and look at their API documentation.
    Jesper de Jong
    Java Cowboy
    Saloon Keeper

    Joined: Aug 16, 2005
    Posts: 15100

    It's difficult to answer that question, because what packages you need depends on what kind of software you are writing. For example, if you are writing a desktop application or an applet, then you most likely use the Swing and AWT packages (javax.swing and java.awt), but if you're writing server-side software that doesn't have a GUI then you don't need those.

    Ofcourse, the classes in java.lang and java.util are the most used packages from the standard Java API.

    Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
    Joe Ess

    Joined: Oct 29, 2001
    Posts: 9191

    Originally posted by Campbell Ritchie:
    String may be the most frequently used class of all

    This is true of every application I've run through a profiler (mostly web apps). I seem to remember that second place went to HashTable, presumably used by the JVM or J2EE for mapping purposes.

    [How To Ask Questions On JavaRanch]
    marc weber

    Joined: Aug 31, 2004
    Posts: 11343

    Depending on what you're doing, I might add java.math and java.text to the list. But as already mentioned, a beginner is not going to stray much outside of java.lang and java.util, and the list of other packages you're likely to use is a lot smaller than you think. So don't let the API intimidate you.

    "We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
    Jim Yingst

    Joined: Jan 30, 2000
    Posts: 18671
    I think these are probably my top, well, 23:


    I think the first two will be true for eveyone, and after that it really depends on what sort of jobs you get hired to do. As a beginner, I'd just focus on the first two.
    [ December 21, 2007: Message edited by: Jim Yingst ]

    "I'm not back." - Bill Harding, Twister
    krishna balaji
    Ranch Hand

    Joined: Mar 16, 2006
    Posts: 31
    Thank you
    it was very useful
    I agree. Here's the link:
    subject: Top 20 frequently used java packages
    It's not a secret anymore!