What are the usages of package in java? , JAVA Programming

It helps to resolve naming conflicts when different packages have classes with the same names. This also helps you prepare files within your project. As define: java.io package do something related to input output and java.net package do something to do with network and so on. If we toward to put all .java files into a single package, as the project gets larger, then it would become a nightmare to manage all your files. You may create a package as follows with package keyword, which is the first keyword in any Java program followed by import statements. The java.lang package is imported implicitly by default when a java program created and all the other packages must be explicitly imported when a java program created.

 

package com.xyz.client ;

import java.io.File;

import java.net.URL;

 

Posted Date: 7/25/2012 12:25:39 AM | Location : United States







Related Discussions:- What are the usages of package in java? , Assignment Help, Ask Question on What are the usages of package in java? , Get Answer, Expert's Help, What are the usages of package in java? Discussions

Write discussion on What are the usages of package in java?
Your posts are moderated
Related Questions
A socket is one end-point of a two-way communication link among two programs running on the network. A socket is bound to a port number so that the TCP layer can recognize the appl

A one page website where a user can input the information including Company Name, Title, Activity, R/S, I also need the user to select the start date, end date, and check poi

for $9.95 per month, 10 hours of access are provided.Additional hours are $2.00 per hour

creating connection which will authenciate for a password

How does an exception permeate through the code? An unhandled exception moves up the method stack in search of a matching When an exception is thrown from a code which is wrapp

ActionServlet performs the role of Controller: ? Process user requests ? Verify what the user is trying to achieve according to the request ? Pull data from the model (if

JavaServer Faces(JSF) is a framework for building web-based user interface in Java. Unlike Swing, JSF provides widgets like buttons, hyperlinks, checkboxes, etc. in dissimilar ways

What is Alternate Text ? The APPLET element can have an ALT attribute. An ALT attribute is used through a browser which understands the APPLET tag but for some purpose cannot

What is Scope of Variable ? Space in that a variable is effective is called as the scope of a variable. In other words we can say area where that variable is available for the

A Java package is a naming context for classes and interfaces. A package is used to make a separate name space for groups of classes and interfaces. Packages are also used to arran