📜  Java和 Ruby 的区别

📅  最后修改于: 2021-09-12 10:35:32             🧑  作者: Mango

Java是一种高级、开源、面向对象的通用编程语言。 Java既是编译型编程语言,又是解释型编程语言,因为它的源代码首先被编译成字节码,然后字节码由 JVM 解释。 1995 年,它由 Sun Microsystems 的 James Gosling 开发。

使用Java 的公司有 Uber、Airbnb、Google、Netflix、Pinterest、Amazon 等。

Ruby是一种高级、纯面向对象的通用编程语言。它是一种解释型编程语言。在 1990 年代中期,它由日本的Yukihiro “Matz” Matsumoto开发。

使用 Ruby 的公司有 Github、Shopify、Twitter、Airbnb、Dribbble 等。

Java和 Ruby 的区别:

JAVA

RUBY

Java is a high-level, open-source, object-oriented, and general-purpose programming language. Ruby is a high level, purely1990sa fewer, object-oriented, and general purpose programming language.
Java is considered as both compiled and interpreted programming language. Ruby is an interpreted programming language.
In 1995, it was developed by James Gosling at Sun Microsystems. Ruby was developed by Yukihiro “Matz” Matsumoto in Japan in the mid-1990s. 
It is a little complex and a  general-purpose language but a little slower than Ruby.  It is simpler and little faster than Java.
Java is a good choice for high traffic sites and huge computational applications. Ruby is a good choice for less traffic sites and less load computational applications.
It uses static typing. It uses dynamic typing.
To define a method/class block in Java braces are used. To define a method/class block in Ruby ‘end’ keyword used.
In Java class definitions have an access modifier. While in Ruby class definitions do not have an access modifier like Java.
Web app frameworks are Spring, JSF, GWT etc. Web app frameworks are Ruby on Rails, Sinatra, Hanami, etc.
Companies using Java are Uber, Airbnb, Google, Netflix, Pinterest, Amazon etc. Companies using Ruby are Github, Shopify, Twitter, Airbnb, Dribble, etc.