在尝试 Android 编程之前,我应该学习多少 Java?

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

How much Java should I have learnt before trying Android programming?

javaandroid

提问by

I have been seeking beginner learning books in Android, and of course found out that I should learn Java first. So I began studying Java and now I am quite comfortable with objects, classes, inheritance, interfaces, and just moved onto Layouts in Swing as well as Swing Features. But I am starting to wonder.... do I know enough about Java now? Can I start programming Android yet?

我一直在寻找Android初学者学习书籍,当然发现我应该先学习Java。所以我开始学习 Java,现在我对对象、类、继承、接口非常熟悉,并且刚刚转向 Swing 中的布局以及 Swing 功能。但我开始怀疑……我现在对 Java 了解得够多了吗?我可以开始编写 Android 了吗?

Of course I can keep going in Java, but have been itching to begin programming Android apps.

当然,我可以继续使用 Java,但一直渴望开始编写 Android 应用程序。

Any definitive answer here about how much Java I need to know before Android?

这里有关于在 Android 之前我需要了解多少 Java 的明确答案?

Thanks so much!

非常感谢!

回答by duffymo

Try it and see - only you can answer that. If you start and find it difficult, you don't know enough. It'll actually be a good motivation to continue learning Java. I'd go for it.

试试看 - 只有你能回答这个问题。如果您开始并发现它很困难,则说明您了解得还不够多。这实际上是继续学习 Java 的一个很好的动力。我会去的。

回答by Kevin Sylvestre

Go give it a try! I find it best to learn programming languages doing real world example, and if Android keeps your interest it is probably a great example.

去试试吧!我发现最好学习编程语言做真实世界的例子,如果 Android 保持你的兴趣,它可能是一个很好的例子。

回答by OscarRyz

do I know enough about Java now?

我现在对 Java 了解足够了吗?

Yes

是的

Can I start programming Android yet?

我可以开始编写 Android 了吗?

Yes

是的

how much Java I need to know before Android?

在 Android 之前我需要了解多少 Java?

A complete understanding of the basics would be desirable.

对基础知识的完整理解将是可取的。

Specifically the following topics:

具体有以下主题:

  • Declarations and Access Control
  • ObjectOrientation
  • Assignments
  • Operators
  • Flow Control, Exceptions, and Assertions
  • Strings, I/O, Formatting, and Parsing
  • Generics and Collections
  • InnerClasses
  • Threads
  • 声明和访问控制
  • 面向对象
  • 作业
  • 运营商
  • 流控制、异常和断言
  • 字符串、I/O、格式化和解析
  • 泛型和集合
  • 内部类
  • 线程

But if you know already the basics ( classes, objects, inheritance, interfaces ) I think you're ok to start.

但是,如果您已经了解基础知识(类、对象、继承、接口),我认为您可以开始。

You don't need to learn specific libraries ( like swing, or others ) because you won't use them in Android.

您不需要学习特定的库(如 Swing 或其他),因为您不会在 Android 中使用它们。

回答by Hyman

What you really need of Java is syntax and capabilities. You don't need to know specific API that you will learn with Android anyway.. so I think you can go with Android easily.

Java 真正需要的是语法和功能。无论如何,您不需要知道您将在 Android 中学习的特定 API ..所以我认为您可以轻松地使用 Android。

Actually you could just learn Java along with Android without any problems..

实际上,您可以在没有任何问题的情况下学习 Java 和 Android。

回答by Maximus

I jumped right into Java and Android at the same time knowing basically nothing about either. I had about 2 years experience with C doing homebrew for nintendo DS so nothing was really OOP and it was all single threaded.

我同时对 Java 和 Android 一无所知。我有大约 2 年的 C 为 nintendo DS 做自制软件的经验,所以没有什么是真正的 OOP,而且都是单线程的。

Since you know what you do of Java, I'd say you'll be fine. The bottom line, is that slow is good. Take it easy, take it slow and don't skip ANYTHING. The provided developers guide is very solid, covers all of the important concepts. An early piece of advice... don't block the UI thread... If you're going to write a game pay special attention to how to create a proper game loop thread. There's really not a lot on that provided by Google (except for SDK example games) but there's information out there.

既然你知道你对 Java 做了什么,我会说你会没事的。最重要的是,慢就是好的。放轻松,慢慢来,不要跳过任何东西。提供的开发人员指南非常可靠,涵盖了所有重要概念。一个早期的建议...不要阻塞 UI 线程...如果您要编写游戏,请特别注意如何创建适当的游戏循环线程。谷歌提供的内容真的不多(SDK 示例游戏除外),但那里有信息。