goldr4k3-avatar

What are Packages in Java Programming?

Can you provide some details of Java Programming Packages?
over 13 years ago
0%

8 replies

over 13 years ago
alfred67-avatar
"A package is a namespace that organizes a set of related classes and interfaces. Conceptually you can think of packages as being similar to different folders on your computer. You might keep HTML pages in one folder, images in another, and scripts or applications in yet another. Because software written in the Java programming language can be composed of hundreds or thousands of individual classes, it makes sense to keep things organized by placing related classes and interfaces into packages. The Java platform provides an enormous class library (a set of packages) suitable for use in your own applications. This library is known as the ""Application Programming Interface"", or ""API"" for short. Its packages represent the tasks most commonly associated with general-purpose programming. For example, a String object contains state and behavior for character strings; a File object allows a programmer to easily create, delete, inspect, compare, or modify a file on the file-system; a Socket object allows for the creation and use of network sockets; various GUI objects control buttons and check-boxes and anything else related to graphical user interfaces. There are literally thousands of classes to choose from. This allows you, the programmer, to focus on the design of your particular application, rather than the infrastructure required to make it work"
over 13 years ago
alexey-avatar
"Some sort of Coffee parcel is a system pertaining to organizing Caffeine courses in namespaces exactly like the web template modules involving Modula. Capuccino bundles is usually held in condensed files known as Container documents, letting lessons in order to download faster as a group in lieu of one-by-one. Software engineers furthermore commonly make use of plans to arrange instruction from the very same classification or perhaps delivering equivalent performance. "
over 13 years ago
johnatan-avatar
"Introduction : Many times when we get a chance to work on a small project, one thing we intend to do is to put all java files into one single directory. It is quick, easy and harmless. However if our small project gets bigger, and the number of files is increasing, putting all these files into the same directory would be a problematic for us. In java we can avoid this sort of problem by using Packages. Packages are nothing more than the way we organize files into different directories according to their functionality, usability as well as category they should belong to. Packaging also help us to avoid class name collision when we use the same class name as that of others. For example, if we have a class name called ""Vector"", its name would crash with the Vector class from JDK. However, this never happens because JDK use java.util as a package name for the Vector class (java.util.Vector). So our Vector class can be named as ""Vector"" or we can put it into another package like com.mycompany.Vector without fighting with anyone. The benefits of using package reflect the ease of maintenance, organization, and increase collaboration among developers. Source: http://in.docsity.com/en-docs/Internet_Application_developement__Essay__Lecture_notes__VINOD"