in Education by
Hello mates….what is the use of keyword “import”??need ur help… Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
Short notes on import statement: In Java, Import statement is used for referring either all the classes & interfaces of the specific package (or) a specifying about particular class/interface of a specific package in our java program. Syntax: (i) import package1.package2…..*; It is used to import all the predefined properties of specific package. (ii) import package1.package2….classname/interfacename; It refers either one class (or) one interface of a specific package but not all. Advantages of ‘import’: (i) Easier to provide access control. (ii) Name conflicts i.e Name space collision is avoided. (iii) Reusability. Hope this information helps!

Related questions

0 votes
    Hey gys I want to purchase a gaming laptop »™ I need ur help gys » name some laptop under 30000 with good processor and ram and rom Select the correct answer from above options...
asked Dec 19, 2021 in Education by JackTerrance
0 votes
    import java.util.*; class hello{ System.out.println(Math.ceil(-28.23)); } IN THIS CODE JAVA COMPILER IS ... URGENT .PLEASE . Select the correct answer from above options...
asked Dec 20, 2021 in Education by JackTerrance
0 votes
    hello friend help me in question what is cell in computer Select the correct answer from above options...
asked Nov 26, 2021 in Education by JackTerrance
0 votes
    hello friend help me in question what is cell in computer Select the correct answer from above options...
asked Nov 25, 2021 in Education by JackTerrance
0 votes
    hey mates…… annyeong what is the difference between parameterized Constructor and Default constructor ( points must be varied) *_* Select the correct answer from above options...
asked Dec 14, 2021 in Education by JackTerrance
0 votes
    Heyy mates..Am an icse student can anyone tell me any importance for java please its urgent I have my exam ... please for icse java. Select the correct answer from above options...
asked Nov 30, 2021 in Education by JackTerrance
0 votes
    What is the use of ‘this’ keyword in java Answer in simple words Select the correct answer from above options...
asked Dec 19, 2021 in Education by JackTerrance
0 votes
    What is the use of ‘this’ keyword in java Answer in simple words Select the correct answer from above options...
asked Dec 18, 2021 in Education by JackTerrance
0 votes
    In an order to perform a calculation in a spredsheet you need to use a Select the correct answer from above options...
asked Dec 28, 2021 in Education by JackTerrance
0 votes
    You need to combine the first_name and last_name columns in the employees table and display the columns as a combined ... | and || Select the correct answer from above options...
asked Dec 1, 2021 in Education by JackTerrance
0 votes
    You need to store the seasonal data in months and years. Which data type should you use? Select the correct answer from above options...
asked Dec 1, 2021 in Education by JackTerrance
0 votes
    What will be the output of print str[2:5] if str=’hello world!? Select the correct answer from above options...
asked Dec 25, 2021 in Education by JackTerrance
0 votes
    Simran write a code print: (“hello friends”)but when she executed there comes an error what was the error and why did it occur Select the correct answer from above options...
asked Dec 23, 2021 in Education by JackTerrance
0 votes
    . 1. Find the output of the following programs. (a) 10 LET AS = “HELLO” 20 LET BS = “FRIENDS” 30 PRINT AS:BS 40 END Select the correct answer from above options...
asked Nov 29, 2021 in Education by JackTerrance
0 votes
    (a) What will be the output of the following Python code? from math import factorial print (math.factorial (5) ... : print(factorial(5) Select the correct answer from above options...
asked Dec 17, 2021 in Education by JackTerrance
...