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
What is the difference among ForwardAction and IncludeAction? Ans) The difference is that you require to use the IncludeAction only if the action is going to be contained by ano

Question: (a) Draw out a UML class diagram that captures the following information: An Employee is a kind of Person. An ATM is a kind of Machine. Both an Employee and an ATM

What is Object Oriented Programming explain with an example? In Java everything is an object or a class (or a piece of one or a collection of various). Objects send messages t

Objectives _ Creating and compiling a simple program _ Designing classes _ Use of recursive algorithms _ Learn basic combinatorics   Task: string permutation Writ

Develop an E-commerce website I prefer this website to be coded with JAVA since I have heard this is safer than PHP is. Though, if this is not possible I am willing to go with P

On the surface, an application context is similar as a bean factory. But application context offers much more.. ? Application contexts give a means for resolving text messages,

Prepare Simple spring maven task Project Description: We want a very simple delivery for one of our tasks using Spring STS Maven project. This chat does not have UI interf

Don''t know how to write this...can anyone help me?

What is Documentation for the class library Sun gives a large amount of documentation for the classes, interface's and exceptions in the class library. If you've installed the

JMS consumer is a JMS client that receives messages.