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
short Java application that stores words in an Array or ArrayList.

Write an XHTML document that uses JavaScript code to do the following.  The user is first prompted for a word and then for a possible prefix for that word.  If the prefix is not an

Obtain ONE of the sample applets from Sun Microsystems' Applets page, or any other source for free Java applets you may wish to use. Test the applet, and link it to Part 2 of your

program t ofind area under the curve y=f(x) between x=a and x=b integrate y=f(x) between the limits a and b

Question: (a) Java does not support multiple inheritance but does provide the concept of ‘interface'. Explain how interfaces can help a programmer to implement multiple inheri

This project focuses on demonstrating the understanding of data types, input/output, sequential and selection programming statements, and mathematical operations. The project re

Question: A new software engineer has joined Axistex Ltd. The systems analyst informs him that the organisation works with different operating system. The HR department works w

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

Read information of n students. The class name should be kkhsou with the member variable name, rollno, center_code and percentage in last examestion.Display the students data whose

Conversation to HTML Project Description: We have inner pages to be transformed into html for travel domain. 1. Flight search page for one way and round trip 2. Bus res