提高我的 Java 编程技能的练习

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2892167/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 14:09:43  来源:igfitidea点击:

Exercises to improve my Java programming skills

java

提问by Jay Mayu

I have learned basics of Java but want to practice more. I was looking via Google and couldn't find many beginner level problems that I can solve using Java.

我已经学习了 Java 的基础知识,但还想练习更多。我正在通过 Google 查找,但找不到许多可以使用 Java 解决的初级问题。

Any suggestions?

有什么建议?

采纳答案by Anthony Forloney

I recommend reading through the Sun's tutorialsfor code examples and practice in allareas of Java programming, especially the areas you wish to improve in.

我建议通读Sun 的教程,了解 Java 编程所有领域的代码示例和实践,尤其是您希望改进的领域。

Depending on how much of beginner examples you were looking for, check out CodingBatfor some good beginner exercises. Project Euleris another good site, but depending on your skill level now, this may be too much, but it's worth trying anyways.

根据您正在寻找的初学者示例的数量,请查看CodingBat以获得一些好的初学者练习。Project Euler是另一个不错的网站,但根据您现在的技能水平,这可能太多了,但无论如何都值得尝试。

Most importantly, Its also worth noting that personal projectsare a great way to start to learn a new language. I would also recommend starting a project that is benefical to you and get cracking right away, no time is better than the present!

最重要的是,还值得注意的是,个人项目是开始学习新语言的好方法。我还建议您开始一个对您有益的项目并立即开始破解,没有比现在更好的了!

回答by duffymo

My recommendation is to solve problems that you're interested in, writing code that might be useful to you.

我的建议是解决您感兴趣的问题,编写可能对您有用的代码。

Java is a huge box. It's got a lot of computer science inside: graphics, scientific computing, relational databases, user interfaces for desktop and web, messaging and queuing, multi-threading, security, and more. Each area has their own "beginner problem". Which one do you mean?

Java 是一个巨大的盒子。它里面有很多计算机科学:图形、科学计算、关系数据库、桌面和 Web 用户界面、消息传递和队列、多线程、安全性等等。每个领域都有自己的“初学者问题”。你指的是哪一个?

How do you define "beginner problem"? Maybe you're having trouble because you aren't narrowing your search enough.

您如何定义“初学者问题”?也许您遇到了麻烦,因为您没有充分缩小搜索范围。

If your imagination is lacking, your best bet is to Google something like "java beginner practice problems"and investigate what you get back.

如果您缺乏想象力,最好的办法是在Google 上搜索诸如“java 初学者练习题”之类的内容,然后调查您的收获。

Or start with Sun's on-line Java tutorialand work you way all the way through it. You'll know a fair amount about Java when you're done.

或者从Sun 的在线 Java 教程开始,然后一路学习。学完之后,您就会对 Java 有相当多的了解。

回答by vodkhang

If you wanted to learn some GUI, may be tic tac toe is good. Even for console, I still find that is a fun problem. Not challenging but a little bit fun. Later you can advance some other games or port that game to GUI, client server or java applet for the web. I think if you want to learn something and get fun as well, game is a good choice:)

如果你想学习一些 GUI,可能 tic tac toe 是好的。即使是控制台,我仍然觉得这是一个有趣的问题。不具有挑战性,但有点有趣。稍后您可以推进一些其他游戏或将该游戏移植到 GUI、客户端服务器或 Web 的 Java 小程序。我觉得如果你想学点东西又想玩得开心,游戏是个不错的选择:)

回答by Yuval Adam

When learning a new language, there are some nice problem sets you can use to learn the language better.

在学习一门新语言时,您可以使用一些很好的问题集来更好地学习该语言。

  • Project Eulerhas some nice problems with a strong mathematical twist.
  • Practice on Google Code Jampast problems, stick to the qualification rounds for the easier problems
  • 欧拉项目有一些很好的问题,具有很强的数学扭曲。
  • Google Code Jam过去的问题上练习,对较简单的问题坚持资格赛

回答by Xorty

Once you are quite good in Java SE (lets say you are able to pass SCJP), I'd suggest you get junior Java programmer job and improve yourself on real world problems

一旦您在 Java SE 方面相当出色(假设您能够通过 SCJP),我建议您获得初级 Java 程序员的工作并在实际问题中提高自己

回答by Donal Fellows

You could try the problems at RosettaCode, many of which lack Java solutions at the moment. The problems are of many different difficulties, but each has a solution already in another language which should help with the algorithmic side.

您可以在RosettaCode尝试这些问题,其中许多目前缺乏 Java 解决方案。这些问题有许多不同的困难,但每个问题都有另一种语言的解决方案,这应该有助于算法方面。

回答by HZhang

Go and buy the book titled "Java examples in a nutshell". In the book you will find most of practical examples.

去购买一本名为“Java 示例简述”的书。在本书中,您将找到大部分实际示例。

回答by MrSmith42

I highly recommend reading the book 'Effective Java'from Joshua Bloch.

我强烈建议你阅读这本书“有效的Java”约书亚布洛赫。