What is a package? give an example {with reference to java}
Answers
Answered by
13
Package is a namespace that recognises is a set of related classes & interfaces.
java.applet & java.aet is example.
java.applet & java.aet is example.
webstar0:
r u understand
Answered by
5
package is a group or collection of class, interface, sub-package.
two type of package:
1.built-in-package.
in java-8 (14-built in package )
java.util (package)
java.lang(default-package)
java.io(package)
so... on 14 package provided by java you can go on jdk->src(folder) to see all built-in package in java...
2. user can also make itself package by using package keyword...
learn through hiearchy
package(top)
/ | \
class interface sub-package
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
all of these contain method.
two type of package:
1.built-in-package.
in java-8 (14-built in package )
java.util (package)
java.lang(default-package)
java.io(package)
so... on 14 package provided by java you can go on jdk->src(folder) to see all built-in package in java...
2. user can also make itself package by using package keyword...
learn through hiearchy
package(top)
/ | \
class interface sub-package
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
all of these contain method.
Similar questions