Free latest PlacementPapers, Interview Questions ....  
Invite Your Friends

Go Back   Free latest PlacementPapers, Interview Questions .... > INTERVIEW QUESTIONS ( FRESHERS & EMPLOYEES ) > Programming > J2EE - Java


  



Reply

 

LinkBack Thread Tools
Old 12-11-08, 02:06 PM   #1 (permalink)
Senior Member
 
Join Date: Nov 2008
Posts: 311
Default What are the usages of Java packages?




What are the usages of Java packages?

It helps resolve naming conflicts when different packages have classes with the same names. This also helps you organize files within your project. For
example: java.io package do something related to I/O and java.net
package do something to do with network and so on. If we tend to put all .java files into a single package, as the project gets bigger, then it would become a nightmare to manage all your files.

You can 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 and all the other packages
must be explicitly imported.

package com.xyz.client ;
import java.io.File;
import java.net.URL;
__________________
Sai
Prepaid Mobile Recharge Online - Airtel, Vodafone, Idea, BSNL Cellone, Reliance Mobile, Tata Indicom.
sai6606 is offline   Reply With Quote
Old 27-11-08, 10:14 AM   #2 (permalink)
diollaHitte
Guest
 
Posts: n/a
Default Java questions

thanks for the post
  Reply With Quote
Old 27-11-08, 10:20 PM   #3 (permalink)
Spealpploparf
Guest
 
Posts: n/a
Default Java Questions

Thanks for the post
  Reply With Quote
Old 29-11-08, 03:10 AM   #4 (permalink)
heinehaumma
Guest
 
Posts: n/a
Default Java Questions

thanks for the post
  Reply With Quote
Reply

Tags
Java, packages?, usages

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT +6.5. The time now is 12:30 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Please Do Not post, copyrighted/internal contents.We are not responsible for any kind of copyrighted material.
If you have objection to any content, please let us know to remove it ASAP.
admin@placementpapers.us