The tricks to learn Java quickly

Q. Best way to learn  english language!!
A. Read the oxford dictionary... Really?? No you learnt english reading novels and watching movies.
Q. Best way to learn Java!! 
A. Don't go on reading a book/dictionary.

Q. Then How do I learn Java?
A. Before that lets answer this, Why do we fail sir? Because we give up.
The biggest problem in learning a new language is giving up. People give up before they are productive enough to enjoy the fruits. So you need to make sure that you are productive before your patience runs out.

How. 
First, take a book on java (any book that teaches java 7/8), read through, like you read a novel (not like a school book, don't mug up). Finish this in a week. Not the complete book, just as much as you can. But you are reading a novel, haven't you finished novels in a week?

Then, Secondly, Don't do those stupid number problems/trick programs/ascending/descending/sorting/searching/hashing... etc. Just Don't. You shall do them in a introductory programming course + Algorithms course, not when learning a new language. Besides these things don't make you ready for industry or personal projects. If you don't have introductory programming+basic math skills learn them first. And don't concentrate on corner cases, you learn about corner cases when they arise in your projects, not before.

Pick up a small project, something you want to do. Don't go big. You are not Tony stark so don't try making Jarvis. I did a sudoku and then a website downloader (crawls through the site and downloads each page, simplified version of httack). In the website downloader I learnt to use AVL trees + Java I/O + Folder management + Networking. 

Q. Wouldn't it take long time to learn AVL trees + Java I/O + Folder management + Networking??
A. Yes, and probably your patience will reach it's end before you have made a small project.

Q. So what to do?
A. Use libraries, They make your life easier, they let you be productive before you give up. Why reinvent the wheel? I uses apache commons I/O and networking libraries. JDK itself comes with great libraries for data structures, use them.

Q. Now what?
A. Now that you have done a small project, you probably feel confident. start writing bigger projects. Or just improve your small project, make it big. Think new features you can implement in your small project and do it. Going by the same website downloader, try implementing filters. Filters based on hyperlinks will teach you regex use. Make a GUI for it, you will learn Java swing. 

Q. Done that, what's next?
A. Now you have probably realised that your code is not manageable, its unreadable and you are having a hard time adding new features. You have common code that could have been put in a single place. 
This is when you start thinking about inheritance/OOP features, about making common code as library. You think about using design patterns and frameworks. Consider using Play or Spring framework , or look into other design patterns and frameworks that suit your task.

Now keep doing new projects, keep adding on your old projects, learn about the good practices followed and look into the libraries you are using. Learn about data structures and algorithms too. Your aim must be to be more productive, Never show off. The day you start showing off you will fall. 
You will make a great programmer (Not just a java programmer).

Here are some useful tools.

Useful IDEs : 
1. Eclipse - Eclipse Luna

2. Netbeans - Welcome to NetBean

3.IntelliJ IDEA is also great IntelliJ IDEA: The Java IDE for Professional Developers by JetBrains. (It’s not only for Professionals)

To start learning Java Online : 
1. Java Tutorial : 
http://docs.oracle.com/javase/tu...
2. Tutorials Point : 
Page on tutorialspoint.com...
3. Vogella
Eclipse, Android and Java training and support
4. Mkyong
Java web development tutorials

Java Reference Books : 
1. Head First Java : 
Page on headfirstlabs.com...
2. Java for Dummies : 
Page on dummies.com...
3. Java complete reference - Latest Edition.

Interview Questions : 
The Insider's Guide to Java Interviewing...
http://www.tutorialspoint.com/ja...

Keep programming and practicing. Start using third party libraries once you are comfortable with basics.

Plan, Organize, Modularize, Reuse - Code as much as possible.

Try and confirm to these Coding Standards: 
http://cleancode.sourceforge.net...
 
http://www.codeproject.com/Artic...

Forums you can visit : 
StackOverflow
CodeRanch

Here's an answer I came across, which summarizes things :

Programming Practice and Contest

Tutorials

Social Interaction

Must Read

Here’s a link to top books referred on stack overflow :

Top mentioned books on stackoverflow.com

原文地址:https://www.cnblogs.com/2Bthebest1/p/8403415.html