JDK1.8是什么,为什么开发者通常使用JDK1.8?

huangapple go评论150阅读模式
英文:

What is the jdk1.8 and why developers usually use the jdk1.8?

问题

作为一名初级后端开发者,有许多资深开发者问我什么是 JDK。我简单地回答 JDK 是 Java 开发工具包,它帮助开发者制作基于 Java 的程序,并包括可以在计算机上运行 Java 程序的 JRE 和 JVM。

在在 Stack Overflow 上提问之前,我查找了什么是 JDK 以及为什么我们通常使用 JDK 1.8。然而,我没有找到清晰的答案(也许我不够聪明,无法理解我找到的内容)。此外,还有一些答案说 JDK 是 Java8 或其他版本的 Java。这些答案让我感到非常困惑。

无论如何,您是否可以友好地回答我什么是 JDK 以及为什么开发者通常使用 JDK 1.8?请告诉我您的意见。

附言:我是一名初级开发者,已经在后端开发领域工作了一年。我在谷歌上搜索了 JDK 并查找了一些关于 JDK 的信息,包括在 oracle.net 和维基百科上的信息。在了解了 JDK 的定义后,我希望能听到更清晰的答案,希望能从资深开发者那里获取更多信息。

英文:

As a beginner of backend developer, there are many senior developers ask me what is the jdk. I simply answerd the jdk is java development kit, it helps developer to make java-based program and includes jre and jvm that can run java program on computer.

Before ask question at Stack Overflow, I've looked up what is jdk and why we usually use jdk1.8. However, I cannot find clear answer(maybe I'm not enough clever to understand what I found). Also, there are some answers that jdk is Java8 or some other version of Java. These kind of answers make me confused a lot.

Anyway, would you kindly answer me what is jdk and why developers usually use jdk1.8? Please tell me your opinions.

p.s) I'm a junior developer and I've been worked as a backend developer about an year.

I googled the jdk and looked up some information about jdk at oracle.net and the wikipedia. After understanding the definition of jdk, I hope to listen more clear answers from senior developers.

答案1

得分: 0

以下是已翻译的内容:

升级到jdk1.8时,出现了许多变化和新功能,例如lambda和函数式编程。此外,对jdk实用程序进行了许多优化,如哈希映射的实现。与jdk1.7相比,使用jdk1.8进行编码可以提供很大的便利。

英文:

There came up a lot of changes and new features when jdk1.7 upgraded to jdk1.8. Such as lamda and funtional programming.Also, there are a lot of optimizations on jdk utilities like implementation of hashmap.Coding with jkd1.8 can be a big convinience comparing to with jdk1.7.

答案2

得分: 0

这是Java 8版本。但它现在已被弃用,这是java版本列表。为什么开发者使用Java 8,也许当你寻找教程时,它们是在Java 8仍然存在时创建的。

我建议使用至少版本11或17 LTS。就功能而言,Java 11类似于Java 8。但Java 17有更多功能。

英文:

It's a Java version 8. But it's deprecated now, here's the list of java versions. The why developers use java 8, maybe when you looking for tutorials they created it when java 8 is still exists.

I suggest to use minimum version 11 or 17 LTS instead. For the features, Java 11 is similar to Java 8. But Java 17 has much more features.

答案3

得分: 0

JRE (Java Runtime Environment) 提供基本/标准库、JVM 和其他在机器上运行编译代码所需的基本组件。

JDK (Java Development Kit) 可以被看作是 JRE 的扩展版本,除了提供 JRE 的功能外,还能够将源代码编译成 JVM 可理解的字节码,提供调试工具以及其他在开发阶段有用的功能。

JDK1.8 是什么

它只是 JDK 的众多版本之一。相较于其前身 JDK1.7,它有很大的改进,引入了新功能,如Lambda表达式、流支持等,使语言更加友好地面向函数式编程风格,还有其他改进。

为什么选择 JDK1.8

几年前,它成为了“新事物”,以至于许多框架开始不再支持旧版本的Java,并且它成为了首选的环境。

然而,需要注意的是,它不应被视为标准,因为技术是一个快速发展的环境,新版本总是会提高性能,提供更有趣的功能以提高生产力等等。

当前状态 (2023)

Java 8 (以及 JDK 1.8) 不再接收新功能或安全更新补丁,因此这也是我不会称其为标准的原因之一,尽管它可能仍然广泛使用。

始终关注版本的生命周期日期以及新版本的发布:https://en.wikipedia.org/wiki/Java_version_history

特别要关注LTS (长期支持) 发布,因为它们将获得更长时间的支持,而其他版本将测试新功能。

英文:

The concepts

JRE (Java Runtime Environment) provides basic/standard libraries, JVM and other basic components that run your compiled code in the machine.

JDK (Java Development Kit) can be seen as an extended version of the JRE which in addition to what the JRE provides is also capable to compile your source code into byte-code understandable by the JVM, debugging tools and other things that are helpful during development phase.

What is JDK1.8

It is just one of the many versions of the JDK. Having big improvements from It's predecessor JDK1.7 with new features such as lambda expressions, Streams support, among others it impulse the language towards a more friendly approach to functional programming style, among other improvements.

Why JDK1.8

A few years back it became "the new thing", to the point that many frameworks started cutting support for older versions of Java, and it became the preferred environment to use.

However it should not be seen as an standard since technology is a fast evolving environment, and newer versions will always boost performance, have more interesting features that boost your productivity, etc.

Current status (2023)

Java 8 (and JDK 1.8) do not receive any new features, or patches for security updates, so that is one of the reasons I wouldn't call it an standard, even though is probably still largely used.

Always keep an eye to the end of life dates of versions and also the newer versions releases: https://en.wikipedia.org/wiki/Java_version_history

Especially look at the LTS (Long Term Support) releases as those will receive support for extended periods, while other versions will test-out new features.

huangapple
  • 本文由 发表于 2023年6月9日 10:50:45
  • 转载请务必保留本文链接:https://go.coder-hub.com/76436886.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定