c语言和java之间的对话_C ++和Java之间的区别

c语言和java之间的对话

In this tutorial I am going to share difference between C++
and Java. C++ programming language was developed by Bjarne Stroustrup in the
year 1983 and Java Language was developed by James Gosling in the year 1995.
Both C++ and Java are object oriented programming language but still there are
lot of differences between them.

Difference between C++ and Java

C++
Java
C++ is a procedural and object oriented programming language.
Java is pure object oriented programming language.
C++ support structure, union, template, preprocessor, default
arguments, operator overloading and pointers.
Java doesn’t support all these features. Java has concept of “restricted
pointers” that uses references which acts like pointers. But we can’t perform
arithmetic operations on it.
C++ support destructor, which is called to destroy the objects.
Java doesn’t support destructor because it supports automatic garbage
collection.
In C++ we can declare global variables and can define methods outside
the class using scope resolution operator (::).
Java doesn’t have scope resolution operator and we can declare global
variables. The methods can only be defined inside the class.
C++ support goto statement. Use of goto is not considered good because
it makes difficult to understand the program.
goto and const keywords are reserved in Java but they are not used.
C++ supports multiple inheritance and it can be implemented using
class.
Java doesn’t support multiple inheritance. Although it can be
implemented using interface.
C++ is a platform dependent language. Write once, compile anywhere
(WOCA).
Java is a platform independent language. Write once, run anywhere /
everywhere (WORA / WORE).
C++ only uses compiler.
Java uses both interpreter and compiler.
C++ doesn’t have built in thread support. We have to use third party
libraries for thread support. In C++ 11, the thread support is added as a built in feature.
Java has built in thread support. There is a Thread class which is
used to implement multithreading.

These are few difference between C++ and Java. If you find
any mistake in above tutorial or know about any other difference between Java and C++ then please comment
below.

In this tutorial I am going to share difference between C++
and Java. C++ programming language was developed by Bjarne Stroustrup in the
year 1983 and Java Language was developed by James Gosling in the year 1995.
Both C++ and Java are object oriented programming language but still there are
lot of differences between them.

Difference between C++ and Java

C++
Java
C++ is a procedural and object oriented programming language.
Java is pure object oriented programming language.
C++ support structure, union, template, preprocessor, default
arguments, operator overloading and pointers.
Java doesn’t support all these features. Java has concept of “restricted
pointers” that uses references which acts like pointers. But we can’t perform
arithmetic operations on it.
C++ support destructor, which is called to destroy the objects.
Java doesn’t support destructor because it supports automatic garbage
collection.
In C++ we can declare global variables and can define methods outside
the class using scope resolution operator (::).
Java doesn’t have scope resolution operator and we can declare global
variables. The methods can only be defined inside the class.
C++ support goto statement. Use of goto is not considered good because
it makes difficult to understand the program.
goto and const keywords are reserved in Java but they are not used.
C++ supports multiple inheritance and it can be implemented using
class.
Java doesn’t support multiple inheritance. Although it can be
implemented using interface.
C++ is a platform dependent language. Write once, compile anywhere
(WOCA).
Java is a platform independent language. Write once, run anywhere /
everywhere (WORA / WORE).
C++ only uses compiler.
Java uses both interpreter and compiler.
C++ doesn’t have built in thread support. We have to use third party
libraries for thread support. In C++ 11, the thread support is added as a built in feature.
Java has built in thread support. There is a Thread class which is
used to implement multithreading.

These are few difference between C++ and Java. If you find
any mistake in above tutorial or know about any other difference between Java and C++ then please comment
below.

翻译自: https://www.thecrazyprogrammer.com/2015/04/difference-between-c-and-java.html

c语言和java之间的对话

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值