हिंदी

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×