aspose file tools*
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Top 20 frequently used java packages" Watch "Top 20 frequently used java packages" New topic
Author

Top 20 frequently used java packages

krishna balaji
Ranch Hand

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

Joined: Oct 13, 2005
Posts: 38881
    
  23
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
  • java.io
  • 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: 14153
        
      18

    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 7 API documentation
    Scala Notes - My blog about Scala
    Joe Ess
    Bartender

    Joined: Oct 29, 2001
    Posts: 8908
        
        8

    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.


    "blabbing like a narcissistic fool with a superiority complex" ~ N.A.
    [How To Ask Questions On JavaRanch]
    marc weber
    Sheriff

    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
    sscce.org
    Jim Yingst
    Wanderer
    Sheriff

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

    java.lang
    java.util
    java.io
    java.util.regex
    java.text
    java.sql
    java.net
    java.util.concurrent
    java.util.concurrent.locks
    java.util.concurrent.atomic
    javax.servlet
    javax.servlet.http
    java.lang.reflect
    java.nio
    java.nio.channels
    java.nio.charset
    javax.swing
    java.awt
    java.awt.event
    org.xml.sax
    org.w3c.dom
    javax.xml.parsers
    javax.naming

    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
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
     
    subject: Top 20 frequently used java packages