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
Overall Requirements Every phone number is broken up into sections as shown below: Country Code Area Code Prefix Line Number 1 919 882 5000 Write a program to separate out a ph

Elaborate Vector or Object oriented graphics along with at least one example. Object Oriented Graphics are the graphics that are commonly oriented towards the objects and have

What is best algorithm? Greedy algorithm is the best algorithm as it is n algorithm in which always takes the best immediate, or local solution although searching an answer.

? • ?read from a file a series of an infix algebraic expressions comprised of constant and variable operands (integers), operands (%, *, /, +, -) and parenthesis. Two slashes (//)

a)  Using Java, create an interface with a method called concatenation which will be implemented in the class patient in part b. b)  Using Java, write the class patient with the

Aggregation Composition Aggregation :  An   association   in  which  one  class refers to collection or a another class. This is a part of  a  who

Write a short Java application that stores words in an Array or ArrayList. You get to pick the number of words to store. Generate a random number between 0 (inclusive) and the leng

How to Loading Images in JAVA? Polygons, ovals, lines and text cover a lot of ground. The residual graphic object you need is an image. Images in Java are bitmapped GIF or JPEG

Need the following code in double var instead of integer. import javax.swing.*; public class arrayVar { public static void main (String[] args) //This is our main method prompt

What is the role of hub in networks? The network traffic controller - elements of convential computer networks. Hub is used to link the different computers within the network i