Should I learn Java before learning Android or I can do both things in parallel? What is the best approach?
I would absolutely learn Java first. Don't bother learning things like servlets, Swing etc - but learn:
- The core language
- Collections
- IO
- String handling
Trying to learn these while also learning a completely new environment will make it a lot harder to work out where you're going wrong.
Note that this isn't specific to Android - I'd always encourage developers to learn the "core" of a new platform before learning "peripheral" technologies such as native UIs or web frameworks.
I've seen people try to do this before - literally asking complicated questions about advanced scenarios, while not understanding the basics of the language. Sometimes the problem they've been having has been due to the complex API they were using, and sometimes it's been due to the basic misunderstandings - but the problems looks exactly the same to them. They can't tell the difference between not understanding how method arguments are passed, and having difficulty with cross-threading UI operations. As far as they're concerned, "something has gone wrong." Every step is painful when you don't have a solid foundation.
Aside from anything, as boring as console applications with no interaction might be, they're really great for just testing something quickly. You typically don't need to worry about threading, permissions, graphics, resources etc. Another good way to test your understand is via unit tests. Rather than a normal test-first approach, write a method and predict its output with unit tests, until you run out of interesting situations to test. Once you're done, you've got a complete record of what the code does - keep it for later on, in case you need to revisit the concept you were testing.
Learning is always easier when you have a goals to work towards. If your goal is to do primarily Android programming, focus on that and you'll pick up Java on the way.
Yes I would learn at least the basics of Java prior to starting on Android.
Starting in Android would be like learning to scuba dive before learning to swim, sure you could probably struggle your way along, but you'll be making the process unnecessarily more difficult for yourself.
The tutorial given in the Android Developer Website is hard to understand if you don't know anything about java. I'd recommend starting with Java basics and then go on with Android. It would be the best way to understand everthing in an easier way.
In Java, you'll also have to focus the way to do things efficiently because mobile battery is a matter to take into account in mobile applications.
if you know c# ,you can start android now
Java first if you know C# its close enough where you can do it the way you wanted. otherwise, definatly java.
Learn to open a file, deal with user input especially strings, learn all the basic keywords
if your new to dev in general, learn looping, branching, embedding decision making. "your a long way from android in this case i would say" a good book will help a lot more then the free crap youll find online. i went the online route for months and stuggled. grabbed a good book and was moved on the android in 2weeks. if you know where to look, good books are also free ;)
精彩评论