|
-
May 12th, 2000, 10:46 PM
#1
java
what are the complete difference between a c++ class and a java class?
-
May 15th, 2000, 01:18 PM
#2
Re: java
Hi,
Diff between c++ and java class:
1. All java classes are directly/indirectly
inherited from Object class
2. All methods are virtual by default in Java
but not in C++.
3. No multiple inheritance in Java.
Kannan
-
May 16th, 2000, 05:00 AM
#3
Re: java
Ravi,
Exactly what Kannabalu said...
...as well as:
4)Classes in Java are defined within the class declaration.
5)Member methods and variables in Java are, by default, public, whereas in C++ they are private.
6)In C++, Classes must be instanciated as pointers to make use of the new keyword. No pointers in Java(hurray!)
Regards,
dogBear
-
May 16th, 2000, 06:28 AM
#4
Re: java
hey dogBear said that:
Member methods and variables in Java are, by default, public, whereas in C++ they are private.
But the classes member data and functions have "friendly access" not "public" dogBear brush up your skllls.
-
May 16th, 2000, 08:54 AM
#5
Re: java
guys member fungtions and attributes not variable
-
May 16th, 2000, 10:01 AM
#6
Re: java
Skakkar11,
I stand corrected. (hence the rating...)
dogBear
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|