Saturday, May 26, 2012

Day 13 :Date 26,2012



Today we were Taught about the Interfaces In JAva. An interface in the Java programming language is an abstract type that is used to specify an interface (in the generic sense of the term) that classes must implement. Interfaces are declared using the interface keyword, and may only contain method signature and constant declarations (variable declarations that are declared to be both static and final). An interface may never contain method definitions.
Defining an interface
Interfaces are defined with the following syntax :
[visibility] interface InterfaceName [extends other interfaces] {
        constant declarations
        abstract method declarations
}

PACKAGES IN JAVA
A Java package is a mechanism for organizing Java classes into namespaces similar to the modules of Modula. Java packages can be stored in compressed files called JAR files, allowing classes to download faster as a group rather than one at a time. Programmers also typically use packages to organize classes belonging to the same category or providing similar functionality.
A package provides a unique namespace for the types it contains.
Classes in the same package can access each other’s package-access members

0 comments:

Post a Comment

 
;