answersLogoWhite

0

What is Java package?

User Avatar

Anonymous

14y ago
Updated: 8/17/2019

A Java package is like our shopping bag inside which numerous items that we purchased today in the mall are present. Similarly a java package is a bag like thing which contains multiple java classes that are coded inside it. Usually we package classes to keep them organized and to avoid confusions in cases where there are multiple classes with the same name in the application.

For ex: I can write a class that does string operations named "ModifyStrings" and have methods inside them. Unfortunately my friend in my project too can write a class with the same name. so packages come to our rescue. I will put my class inside com.anand.code and he will put com.ajay.code so we both can have our classes.

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

Supermost package of java?

The supermost package of Java is the "java" package.


What is a collection of related classes called in java?

a package


What are the feature's of the Java 'this' installation package?

The Java 'this' installation package allows one to create installation programs for their Java based applications. One can download the program from Java.


Which package is inbuilt in java API?

The java.lang package is automatically imported for you.


What is a default package in Java?

A default package is a package with no name. You can create a Java class without putting package name on top of the code. This class is included in the "default package". Be careful not to be confused with java.lang, which is a package that contains Java's fundamental classes and get's imported by default.


What is user define package?

A user defined package is a package outside of the standard Java libraries.


What is the library in java which does not need to be imported?

The java.lang package in Java is automatically imported for you.


Import a package second time in Java?

You can import a package as many times as you want in Java. The compiler will just ignore any duplicates.


Is it possible to draw in java without using applet?

Yes it is possible to draw in java by using AWT package. or by using javax package.


How do you complie package in java?

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


What are core java total package?

52


Which package in java is treated as default package?

java.lang defines the core Java language, without which all of Java would fail to operate. It is therefore the default package that must be used with every program that will run Java, as it contains all of the logic necessary for exception handling, threads, classes that represent primitives (and their associated logic), and so on.