什么是最好的 Java 示例站点?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/89859/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What are the best Java example sites?
提问by mike
What are the best Java example sites? I'm looking for places that you go when you have a specific question and you want a little Java code snippet to solve it with.
什么是最好的 Java 示例站点?我正在寻找当您遇到特定问题并且想要一些 Java 代码片段来解决它时可以去的地方。
回答by user11445
java2sis the best according to me. because - 1) Like mrlinx said "almost always has a sample on common stuff" 2) Stuffs are nicely organized by category, so, you can easily find out what you are looking for. 3) You can find codes for latest version of JDK
在我看来,java2s是最好的。因为 - 1) 就像mrlinx 所说的“几乎总是有一个关于常见东西的样本”2) 东西很好地按类别组织,因此,您可以轻松找到您要找的东西。3)你可以找到最新版本的JDK的代码
回答by mike
I like Java Almanac (now renamed www.exampledepot.com/). It has great examples and very pertinent questions, but it only goes through java 1.4, so unfortunately it's pretty out of date. It has good coverage of simple questions like "Quintessential Regular Expression Search and Replace Program" and "Reading Text from a File". Also covers some more complicated topics.
我喜欢 Java Almanac(现在更名为 www.exampledepot.com/)。它有很好的例子和非常相关的问题,但它只通过 java 1.4,所以不幸的是它已经过时了。它很好地涵盖了“典型的正则表达式搜索和替换程序”和“从文件中读取文本”等简单问题。还涵盖了一些更复杂的主题。
Another site I like is javapractices.com. This one answers questions at a little higher level than Java Almanac, for example "Modernize old code" or "Know the core libraries".
我喜欢的另一个网站是 javapractices.com。这篇回答比 Java Almanac 高一点的问题,例如“现代化旧代码”或“了解核心库”。
回答by Gili
The Java Developer's Almanac: http://www.exampledepot.com/
Java 开发人员年鉴:http: //www.exampledepot.com/
回答by VonC
I like DZone Snippetsfrom 
我喜欢DZone片段从
It is a public source code repository.
它是一个公共源代码存储库。
You can build up your personal collection of code snippets, and categorize them with tags / keywords.
您可以建立您的个人代码片段集合,并使用标签/关键字对它们进行分类。
(just add another suggestion)
(只需添加另一个建议)
回答by VonC
Wait a minute...
By re-reading your question... I think this site(i.e. stackoverflow) is the very best place for what you are asking for!
等一下......
通过重新阅读你的问题......我认为这个网站(即stackoverflow)是你所要求的最好的地方!
You can publish a problematic java snippet and receive answer.
Case in point : What is the syntax for mod in java
您可以发布有问题的 java 片段并接收答案。
举个例子:java中mod的语法是什么
I have to leave you now: I need to check my profile.
I might have just received my first "brown-nose" badge ;-)
我现在必须离开你:我需要检查我的个人资料。
我可能刚刚收到了我的第一个“棕鼻子”徽章;-)
回答by ShawnD
A place I get a lot of samples / answer to questions is the forums of the sun java web site itself. If the answer isn't there, usually users will point you in the right direction.
我得到很多示例/问题答案的地方是 sun java 网站本身的论坛。如果答案不存在,通常用户会为您指明正确的方向。
回答by ShawnD
I like http://jexamples.com. This has real working code indexed from open source projects. The site also incorporates ratings so the best examples are shown.
我喜欢http://jexamples.com。这有从开源项目索引的实际工作代码。该网站还包含评级,因此显示了最佳示例。
回答by kinshuk4
I think the good site for examples as well as some tutorials is Java Jazzleor k2java.blogspot.com
我认为示例和一些教程的好站点是Java Jazzle或k2java.blogspot.com

