Advertisements
Advertisements
प्रश्न
What is the significance of '*' while importing a package?
थोडक्यात उत्तर
उत्तर
- The asterisk sign imports all classes from the imported package. To import a specific class, replace the "*" sign with its name in the import declaration.
- Example:
import java.util.*; // imports all classes in the util package import java.util.Scanner; // imports only Scanner class from the util package
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?