मराठी

What is the significance of '*' while importing a package? - Computer Applications

Advertisements
Advertisements

प्रश्न

What is the significance of '*' while importing a package? 

थोडक्यात उत्तर

उत्तर

  1. 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. 
  2. 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
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 2: Library Classes - EXERCISES [पृष्ठ १७९]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
पाठ 2 Library Classes
EXERCISES | Q VII. 2. | पृष्ठ १७९
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×