A package is just a mechanism for grouping
objects, it is very similar to grouping items
within a folder or directory on a file system. A class is found within a package, but this does not
have an impact on the class' behavior (review the
"package" access level for a slight exception). An interface, however, is a .java file that is used
(implemented) by another class to tell the outside
world that it conforms to a certain specification. For
example, you might have a "Runnable" interface
that has a "run()" method in it, by having a class that
is "Runnable" (implements Runnable) anyone using that class knows that it must have a "run()" method
defined. This is used when you have several
different classes that have the same interface. Interfaces have more in common with abstract
classes than they do with packages. An interface,
by definition, cannot have any implemented
methods; an abstract class, in contrast, can define
some methods and leave some methods to be
implemented by a subclass. Also, a class can implement many interfaces, but can only extend one
(abstract) class.
Answer by Sahe Alam Ansari, BCA. Nepal bhairahawa. email: mrsahealam@gmail.com
A package is just a mechanism for grouping objects, it is very similar to grouping items within a folder or directory on a file system. A class is found within a package, but this does not have an impact on the class' behavior (review the "package" access level for a slight exception).
An interface, however, is a .java file that is used (implemented) by another class to tell the outside world that it conforms to a certain specification. For example, you might have a "Runnable" interface that has a "run()" method in it, by having a class that is "Runnable" (implements Runnable) anyone using that class knows that it must have a "run()" method defined. This is used when you have several different classes that have the same interface.
Interfaces have more in common with abstract classes than they do with packages. An interface, by definition, cannot have any implemented methods; an abstract class, in contrast, can define some methods and leave some methods to be implemented by a subclass. Also, a class can implement many interfaces, but can only extend one (abstract) class.
A package groups together a set of similar features, such as java.net (for networking) or java.security (for limiting user permissions). An API defines an entire suite of code that can be used to interface with a library or program, and may span multiple packages. In other words, a package is only for organization, while an API is what allows code units to cooperate with each other.
They aren't similar from any aspect.
kai ni bhai....
Header file is a file which is meant to be included into another file during compilation. Examples: string.h, stdio.h, inttypes.h. Header pointer is a pointer to an object called header (for example header of a linked list).
the program contains the which are coding like as our header file ,void main,library function etc.
When you includes any header file using "" that time compiler try to locate this file first from your program's local directory and then from library. But if you include the .h file using <> then compiler assumes you are including some library file.
The FILE type is declared in stdio.h.
There is no system header called share.h, but if there were, it would be: #include <share.h>
pata nhn
Header file is a file which is meant to be included into another file during compilation. Examples: string.h, stdio.h, inttypes.h. Header pointer is a pointer to an object called header (for example header of a linked list).
the program contains the which are coding like as our header file ,void main,library function etc.
Classes and structures can be put in a header file the same way you would use them in a main program; the only difference is that they are placed in a separate file, called a header file. Then, after creating a new file, include that new file with the definition by the use of the preprocessor #include statement.
When you includes any header file using "" that time compiler try to locate this file first from your program's local directory and then from library. But if you include the .h file using <> then compiler assumes you are including some library file.
The header file of graphics in TurboC is graphics.h
Header files are not much different from usual cpp files. There are basically two different things. It's file extension: you need to choose "header file" when you create it or save as .h file. Second is header files do not have main() function. When you are done with you header file do not forger to include it in your project by writing preprocessor directive:#include "your_header_file.h"
stdbool header file use for a new data type that is boolean value
The FILE type is declared in stdio.h.
Not possible. Always make backup copies.
There is no system header called share.h, but if there were, it would be: #include <share.h>
difference between a form file and a form.