answersLogoWhite

0

Why you use user defined package in java?

Updated: 8/20/2019
User Avatar

Wiki User

11y ago

Best Answer

Because, we dont have the package which we want perform the specific task in the lib. Thatz why we need to create packages own and importing it.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why you use user defined package in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you complie package in java?

You use javac <filename> to compile a class or package.


What software package would you use to write Java?

You would use the Java Development Kit (JDK).


What is use of user defined data in c?

to create user defined functions the user defined data is needed nd its useful to the programmer to create its own data.


What is a user-defined region?

A user-defined region is one that is classified by use. eg. hydro-electricity region


Why would you want to use user defined exception handling?

sometimes there are situations where the program is vary long which can make error debugging a long process so java provides a facility to make user defined exception handling suppose we are dividing two numbers a/b and if the user enters the value of b 0, the user wants to display an error of your own so the user can do this by using exception handling


What are the advantages of java swing over java applet?

I think you may have your terminology off a bit.javax.swing is a Java package of graphical user interface (GUI) classes.An Applet is a class designed to be embedded in a web browser.Among the classes in the Swing package is JApplet, which is an Applet extended to work with Swing components.There really is no "advantage" of one thing over the other. They are just different, if related, parts of Java.


What is the use of import in java?

First, it's an error; it should be import java.util.*; That will make all classes in the java.util package availabe for use in your Java class definition. Java is divided up into packages. Each package can hold classes and other packages. java.util is a package.


How might one use the java subclass SimpleDateFormat?

One might use the Java subclass "SimpleDateFormat" when programming a Java application that needs to display the date. This would be then be used to show the user the current date in real time.


What is function overloading in java?

Any function or method in Java that is coded by the programmer is called a user defined method in Java. The JAVA API (Application Programming Interface) has a set of predefined classes & methods that are for our usage. Whatever methods we create apart from these are termed as user defined methods. In java we not use the term functions. We call them "Methods"


Name the following-A key word to use the classes defined in a package?

To access the classes which are present in other packages, we have to import the package to our program using the keyword 'import'. Eg: import packagename.subpackage.Class; OR import packagename.subpackage.*; /*Adds all the class which are present in package*/ 'extends' is the keyword used to inherit the classes defined in other packages.


What is the use of functions in java?

Same as in other languages. To organize commands into logical pieces. However, in Java the functions are called "methods". This is related to the fact that in Java, methods or functions are defined as part of a class.


How do you create packag in java?

You can easily create Java packages with a few steps. # Create a set of classes that you want to be in your package. # Use the package keyword at the top of each of these classes to declare which package they're in. # Organize your source files such that a package name corresponds to a directory name. For instance, the JPanel class has a "package javax.swing;" declaration in the source file, and is located in the javax/swing folder.