MCQs
Total Questions : 8
Answer: Option C. -> package
package
Answer: Option D. -> All of the mentioned
Either we can use public, protected or we can name the class without any specifier.
Answer: Option B. -> Packages
Packages are both naming and visibility control mechanism. We can define a class inside a package which is not accessible by code outside the package.
Answer: Option A. -> Public
Public
Answer: Option C. -> import pkg.*
Operator * is used to import the entire package.
Answer: Option B. -> java
java
Answer: Option D. -> A package can be renamed without renaming the directory in which the classes are stored.
A package can be renamed only after renaming the directory in which the classes are stored.
Answer: Option C. -> Hxllo
Hxllo