Answer Posted / pooja
a package is nothing but a folder in which there are a
collection of classes and interfaces.
of course it is a folder , a folder which is created
explicitly is not a package .
the keyword used for creation of package is "package"
syntax:package <package_name>;
compilation syntax:javac -d path file_name.java;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Differentiate between a class and an object.
Explain try and catch keywords in java?
Can singleton class be cloned?
Explain the difference between throw and throws in java?
How do you do exponents in java?
What is bifunction in java?
What is sortedmap in java?
What is the purpose of default constructor?
How do you generate random numbers in java?
Can we declare array without size in java?
Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?
How do you create immutable object in java?
How do generics work?
What is the difference between jdk, jre, and jvm?
What happens if an exception is throws from an object's constructor?