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
Why is Java platform independent / architecturally neutral / portable?

The game of Life, invented by John Conway, is supposed to model the genetic laws for birth, survival, and death (see Scienti_c American, October 1970, p. 120). We will play it on a

#question.Write a program to find the area under the curve y = f(x) in java.

Write a program called Power that displays the positive powers of 2. When the user enters the exponent at a prompt, the program displays 2 to that power. The program halts when the

Why do we need wrapper classes? It is sometimes simpler to deal with primitives as objects. Moreover most of the collection classes keep objects and not primitive data types. A


In this exercise, I want you to generate password based on random number generator. Develop an application that keeps track of the URL, username and password. I have listed few st

Illustrate the parser method The below table summarizes the parser methods available to a java programmer.

Describe Interfaces in java langauge? Interfaces are the further level of abstraction. An interface is like a class along with nothing but abstract methods and final, static fi

Spring is an open source framework created to address the difficulty of enterprise application development. One of the chief benefits of the Spring framework is its layered archite