| Author |
JavaBeans are similar to Header files in c/c++ ??
|
Anil Jain
Ranch Hand
Joined: Mar 10, 2002
Posts: 51
|
|
I am new to Java programming. From what I read about javabeans it seems they are similar with .h files of c++. That is you write the functions and use these functions anywhere by just including that header file. Correct me if my wrong Thanks,
|
Anil Jain<br />Sun Certified Java(2) Programmer
|
 |
Roy Ben Ami
Ranch Hand
Joined: Jan 13, 2002
Posts: 732
|
|
No Amit.... Java Beans are unlike the header files at all. Java Beans are more like COM if you want to compare to c++ world. Java Beans are just regular java classes that follow a few rules like: they have to have an empty constructor, and a set and get methods for private variables.... there is no equivalent for header files in java (interfaces come close though) cause in java there is no distinction between the declaration of a class and its implementation.
|
 |
Anil Jain
Ranch Hand
Joined: Mar 10, 2002
Posts: 51
|
|
Roy!! Thanks again for correcting me and providing me useful info. Appreciate that.
|
 |
 |
|
|
subject: JavaBeans are similar to Header files in c/c++ ??
|
|
|