什么是最有用和最完整的 Java 备忘单?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3893084/
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's the most useful and complete Java cheat sheet?
提问by limist
I need a cheat sheet for Java and started looking around, but could not find one that seemed "canonical" - which surprised me considering how widespread the language is. Could experienced Java coders please suggest a cheat sheet that is useful(organized so well you actually use it often) and complete(covers real-world daily usage) please?
我需要一份 Java 备忘单并开始四处寻找,但找不到看起来“规范”的备忘单——考虑到该语言的普及程度,这让我感到惊讶。请有经验的 Java 编码人员推荐一个有用的备忘单(组织得很好,您实际上经常使用它)并且完整(涵盖现实世界的日常使用)?
By contrast, here's what I'd consider a canonical cheat sheet for Python: http://rgruet.free.fr/PQR26/PQR2.6.html
相比之下,这是我认为的 Python 规范备忘单:http: //rgruet.free.fr/PQR26/PQR2.6.html
It is complete (syntax, types, statements, built-ins, common modules, idioms) and useful (well-organized: sectioned and hyperlinked; easy to search, and easy to explore).
它是完整的(语法、类型、语句、内置函数、常用模块、习语)和有用的(组织良好:分段和超链接;易于搜索和探索)。
Also, I have looked at the listing here already: http://devcheatsheet.com/tag/java/and did not find a cheat sheet comparable to RGruet's Python cheat sheet above. The top listing in Google for "Java cheat sheet" is http://www.cs.princeton.edu/introcs/11cheatsheet/which is fairly complete, but not organized to be useful. There's gotta' be something better out there!? BTW, it need not fit on 1 page.I'm aware of the Java API docs, but that's more what I'd expect a cheat sheet to link to, not be.
另外,我已经查看了这里的列表:http: //devcheatsheet.com/tag/java/ 并没有找到与上面 RGruet 的 Python 备忘单相媲美的备忘单。Google 中“Java 备忘单”的顶级列表是http://www.cs.princeton.edu/introcs/11cheatsheet/,它相当完整,但没有组织得有用。那里一定有更好的东西!? 顺便说一句,它不需要适合 1 页。我知道 Java API 文档,但这更多是我希望备忘单链接到的内容,而不是.
Update
更新
Some SO members thought this question was subjective, but I think I explained my criteria to be fairly objective: completeness (content) and usefulness (presentation) are not hard to judge in this context. I've accepted one of the more useful answers, but remain surprised that Java doesn't have a canonical cheat-sheet.
一些 SO 成员认为这个问题是主观的,但我认为我将我的标准解释为相当客观:在这种情况下不难判断完整性(内容)和有用性(演示)。我已经接受了一个更有用的答案,但仍然对 Java 没有规范的备忘单感到惊讶。
采纳答案by Mike
回答by Sean
Here is a great one http://download.oracle.com/javase/1.5.0/docs/api/
这是一个很棒的 http://download.oracle.com/javase/1.5.0/docs/api/
These languages are big. You cant expect a cheat sheet to fit on a piece of paper
这些语言很大。你不能指望一张纸上有备忘单
回答by Erick Robertson
This Quick Referencelooks pretty good if you're looking for a language reference. It's especially geared towards the user interface portion of the API.
如果您正在寻找语言参考,这个快速参考看起来很不错。它特别适用于 API 的用户界面部分。
For the complete API, however, I always use the Javadoc. I reference it constantly.
但是,对于完整的 API,我总是使用Javadoc。我不断地参考它。
回答by haylem
It's not really a cheat-sheet, but for me I setup a 'java' search keyword in Google Chrome to search over the javadoc, using site:<javadoc_domain_here>
.
这并不是真正的备忘单,但对我来说,我在 Google Chrome 中设置了一个“java”搜索关键字来搜索 javadoc,使用site:<javadoc_domain_here>
.
You could do the same but also add the domain for the Sun Java Tutorial and for several Java FAQ sites and you'd be OK.
您可以执行相同的操作,但也可以为 Sun Java 教程和几个 Java 常见问题站点添加域,这样就可以了。
Otherwise, StackOverflow is a pretty good cheat-sheet :)
否则,StackOverflow 是一个不错的备忘单 :)
回答by fabiolus
found one interesting cheat sheet here.. http://introcs.cs.princeton.edu/java/11cheatsheet/
在这里找到了一个有趣的备忘单.. http://introcs.cs.princeton.edu/java/11cheatsheet/
回答by software.wikipedia
I have personally found the dzone cheatsheet on core javato be really handy in the beginning. However the needs change as we grow and get used to things.
There are a few listed (at the end of the post) in on this java learning resources article too
For the most practical use, in recent past I have found Java API doc to be the best place to cheat code and learn new api. This helps specially when you want to focus on latest version of java.
mkyong - is one my fav places to cheat a lot of code for quick start - http://www.mkyong.com/
And last but not the least, Stackoverflow is king of all small handy code snippets. Just google a stuff you are trying and there is a chance that a page will be top of search results, most of my google search results end at stackoverflow. Many of the common questions are available here - https://stackoverflow.com/questions/tagged/java?sort=frequent
我个人发现核心 Java上的 dzone 备忘单在开始时非常方便。然而,随着我们成长和习惯事物,需求会发生变化。
在这篇Java 学习资源文章中也列出了一些(在文章末尾)
对于最实际的用途,最近我发现 Java API 文档是作弊代码和学习新 API 的最佳场所。当您想专注于最新版本的 java 时,这特别有用。
mkyong - 是我最喜欢欺骗大量代码以快速入门的地方之一 - http://www.mkyong.com/
最后但并非最不重要的一点是,Stackoverflow 是所有方便的小代码片段之王。只需 google 一个你正在尝试的东西,一个页面就有可能成为搜索结果的顶部,我的大部分 google 搜索结果都以 stackoverflow 结束。许多常见问题都可以在这里找到 - https://stackoverflow.com/questions/tagged/java?sort=frequent