Why in case of java header file name is not required ?

Showing Answers 1 - 7 of 7 Answers

Unlike in C or C++, in Java, there are no header files.

Instead, the compile time information for a program are included from the collection of class called a PACKAGE.

And that need to be included in the begining of the program like "import package-name;".

For any java program, the package java.lang is included by default.

  Was this answer useful?  Yes

Guest

  • Mar 13th, 2006
 

In java all methods are implemented in the class definition hence there is no need of the header files.

  Was this answer useful?  Yes

Navjot Singh Sohanpal

  • Mar 16th, 2006
 

header files in C separates the definition from declaration.

In java, usually you provide both definition and declaration in same file. So no need of header files. Whenever they are separate, you use either interface or abstract class.

HTH

Navjot

  Was this answer useful?  Yes

CHANDRA SEKHAR JONNALAGADDA

  • Jun 10th, 2006
 

 

 

             hi friends java having a classes and packeges so no need to header file in java. so header file is not required. by default java.lang package is having in java. so not required header file .

 

 

thanks                      jonnalagadda chandra sekhar

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions