How to learn Java is a beginner, this is a lot of beginners to contact the first knowledge of the bottleneck, how to learn Java, learn to that step to be able to continue to go down successfully.
The beginning of everything is difficult, especially the introduction of programming, programming entry we understand the system of the language, exercise their programming way of thinking, remember programming English and so on.
Learning Java is a relatively boring stage, every day to face is a pile of unfamiliar code, statements and judgments, so learning programming is important to keep on learning. First of all, Java is a difficult language to learn. Removing some of the annoying features in C++ only improves your motivation to learn a language. The Java programming language as a whole is somewhat difficult. So to chew, chew practice, knock more, remember more, learning Java language is very easy enough to get started.
Let’s talk more about how to get started with the Java programming language
The Java language:
Java is simple, easy to design, easy to write, and therefore easier to compile, debug, and learn than any other Java. Java is object-oriented and is used to build reusable code in modular programs and other applications. Java is platform independent and portable for replication.
Java is a very general purpose language, so it can be used in many different environments. It also runs on many different platforms, so you can run it on Linux machines, Unix, Mac, Windows, or mobile phones. As a result, it can be used with almost anything.
It is an object-oriented language, so many of the basic concepts you learn in Java can be transferred to other languages.
The first step: the theory stage to say
Understanding Java Programming
Learn how Java is cross-platform, what the three versions of Java correspond to, and what is the JVM? What is JDK? What is JRE? The relationship between JDK,JRE, and JVM is summarized.
Understand the grammar
Syntax: Java language syntax must be familiar. When writing code, the IDE editor should know what the syntax error is and what to fix.
Understand Java execution
Understand how the Java language works across platforms, and Java security is primarily there.
Understand the command
You must be familiar with some common JDK commands and their common options. You must be familiar with the following commands: Appletviewer, HtmlConverter, JAR, Java, javac, Javadoc, javap, javaw, native2ASCII, serialver, if you haven’t used all of these commands, then you really don’t know much about Java.
Understand the use of tools
Proficiency with at least one IDE development tool, such as Eclipse, Netbeans, JBuilder, Jdeveloper, IDEA, JCreator, or Workshop, including project management, setting up common options, plug-in installation and configuration, and debugging. Develop good programming thinking
The building of programming thinking can be expanded by buying books, or it can be mastered unconsciously in learning programming.
In programming to master three points in detail: one is to grasp the fundamental abstract concept of the Java language, involving the class and interface two important main line; The second is to grasp the Java programming process; The third is to grasp the various characteristics of Java programming, including encapsulation, inheritance, polymorphism, and so on.
\
Step 2: Master the basicsVariables, data types, operators
Four types and eight kinds, operation, I ++ and ++ I similarities and differences, & and && connection, basic data type conversion rules, if multi-branch statement and switch multi-branch statement similarities and differences, basic knowledge to master must learn knowledge points;
Study period: 3 days
- Binary and decimal conversion
- Comments, one-line comments, multi-line comments, text comments, comment content and bytecode relationships
- Identifiers, keywords, hump principles
- Nature of variables, memory drawing, variable declaration and initialization
- Classification and scope of variables (local variables, member variables, static variables)
- Constants and Final
- Basic data types
- Integer variables and integer constants
- Floating point types, float, double
- Char Indicates an escape character
- Boolean Boolean type, if statement use points, Boolean type space problem
- Introduction to operators
- Arithmetic operators (binary, increment, decrement)
- Assignment and assignment operators
- Relational operators in detail
- Logical operator, short circuit operator detailed explanation
- Bitwise operator detailed explanation
- String connector
- Conditional operators (ternary operators)
- Operator precedence
- Automatic type conversion details
- Mandatory type installation details
- Common errors, overflows, and L problems with basic data types
- Use Scanner to get keyboard input
Step 3:Control statements
The differences between while and do-while loops, the functions of break and continue, and the similarities and differences between if and switch multibranch statements require a deeper understanding;
Study period: 2 days
- Control statements correspond logically to implementation
- If radio structure
- If_elseif_else Multiple choice structure
- The switch statement _IDEA changes the topic
- Loop _while
- Loop _for loop _dowhile
- Nested loop
- Break and continue statements _ label _ control the underlying principles of statements
- Write an annual salary computer _ Baidu search problem secret (important)
- Personal income tax calculator software
- Method core detailed explanation _ genius thinking model to teach master to learn thinking model
- Method overloading
- Explanation of recursion structure _ recursion head _ recursion body
Step 4:Object-oriented programming
What are the aspects of object-oriented characteristics? For example, how to implement polymorphism in Java, the difference between an interface and an abstract class, the role of this keyword, object-oriented three features explain, remember the course
Study period: 5 days
- The difference between procedural and object – oriented
- Overview of classes and objects
- Class properties and methods
- Example Create object memory analysis
- Construtor and Construtor
- Object type parameter passing
- This keyword
- Details of the static keyword
- Local code blocks, constructed code blocks, and static code blocks
- Package and import details
- JavaDoc generates API documentation
- Three features of object orientation
- Object Oriented Encapsulation
- Access permission modifier
- Object-oriented 【 Inheritance 】
- Object class
- Method Override
- Explanation of the super keyword
- Override equals() and toString()
- Memory analysis of object creation in inheritance
- Object-oriented Polymorphism
- upcasting
- Downward transition
- The instanceof operator
- Compile-time and run-time details
- Final modifier
- Abstract Classes and Methods (Abstrct)
- Interface definition and implementation
- New interface features of JDK8
- Interface application: Internal class comparator Comparable
- Inner class details
- Memory management and garbage collection in Java
Step 5:Understanding of exception mechanisms
Study time: 1 day
- Overview of Exceptions
- Exception execution process and analysis
- Try-catch-finally catches an exception
- Throw exception
- Throws Exception
- Exception inheritance system
- Runtime and compile exceptions
- Custom exception
Step 6: Java common classes
Study period: 3 days
- Wrapper Wrapper classes
- Automatic packing and unpacking
- Wrapper class source analysis
- String class usage and memory principle
- Source analysis of the String class
- StringBuffer
- StringBuilder
- Performance analysis of string processing classes
- The Date class
- The System class
- The DateFormat class
- Calendat class
- Math class
- The BigInteger and BigDecimal classes
- The Random class
- Enumeration class
- The File type
- Common interview questions narrated and analyzed
Step 7:Data structure algorithm
Data structure in the study of algorithms, you can learn some common knowledge points very useful can go back to learn.
Study period: 3 days
- An overview of data structures
- The linear table
- The order sheet
- The list
- The stack and queue
- The tree
- Binary tree
- Binary search tree
- Binary balanced tree
- Black mangrove
- figure
- Bubble sort
- Selection sort
- recursive
- Binary search
Step 8:Collection (container)
Study period: 3 days
- The association and difference between collections and arrays
- Set frame system
- Use of ArrayList and source analysis
- Use generics in collections
- Use of LinkedList and source analysis
- Use of HashSet and source analysis
- Hash tables and their principles
- TreeSet use and source analysis
- Comparable and Comparator
- Use of HashMap and source analysis
- TreeMap use and source analysis
- The Iterator in ListIterator
- The Collections utility class
- Old collection classes Vector, Hashtable
- Set summary and selection basis
- A generic interface
- A generic class
- Generic method
Step 9: IO streams
Study period: 2 days
- The concept of IO streams
- I/O stream classification and principle analysis
- File stream FlieInputStream and FileOutputStream
- BufferedInputStream, BufferedOutputStream
- Data stream ObjectInputStream and ObjectOutputStream
- Serialization and deserialization
- Transform streams InputStreamReader and OutputStreamWriter
- Print streams PrintWrite and PrintStream
- Array stream ByteArrayOutputStream, ByteArrayInputStream
- Copy folders with IO
Step 10:multithreading
Study period: 2 days
- Processes and Threads
- Thread creation and startup
- Compare the three ways to create a thread
- The life cycle of the thread
- The thread of control
- Multi-threaded security problems and solutions
- Synchronization of threads: Synchronizing blocks of code
- Synchronization of threads: the synchronization method
- Synchronization of threads: Lock
- Thread deadlock problem
- Thread communication
- Condition
- The full life cycle of the thread
- The thread pool ThreadPoolExecutor
- ForkJoin framework
- Ref;
Step 11:Network programming
Study time: 1 day
- Basic knowledge of computer network
- Network communication protocol
- OSI Reference Model
- TCP/IP reference model
- Analysis of data encapsulation and unpacking principle
- TCP protocol
- UDP protocol.
- IP address and port number
- The URL and the Socket
- Use TCP programming to achieve the login function
- Use UDP programming to achieve customer service system
- Using TCP programming file upload
Step 12:Design patterns
Study period: 3 days
- Introduction to Design Patterns
- Seven principles of Object-oriented design
- Simple factory mode
- Factory method pattern
- The singleton pattern
- The prototype pattern
- Decorative pattern
- Adapter mode
- The appearance model
Java Programming
1. Beijing gaoqi Java300 set (highly recommended)
Java300 sets zero foundation for beginners video tutorial _Java300 sets zero foundation tutorial _Java beginner beginner video foundation consolidation tutorial _Java language entry to master _bilibili _bilibili
2.JavaSE Basics – the god of starting from scratch
JavaSE Knowledge Base full set – from 0 to advanced god _JavaSE basic knowledge system from beginner to master framework _/JAVA Basics/arrays /OOP/ collections /IO streams _bilibili _Bilibili
3.Java full set of courses – basic essential courses
JAVA Full course _Java Introduction _Java Zero Basic Prerequisites _Java Programming course _Java Core Basics _EasyUI_SSM Integration Framework _Redis_ High Concurrency — Full course _Bilibili _Bilibili
4.Java common class foundation combat
Daily recommended Java common classes basic combat _ easy to understand combat primer _Java eight common classes core basic /Java wrapper class /String class _bilibili _bilibili
5. Basic Mathematics knowledge of Java 【 Data structure and algorithm 】
Java basic introduction must learn knowledge data structure and algorithm _Java data structure and algorithm foundation to advanced _Java interview common data structure and algorithm problems _ sorting algorithm _ recursion _ folding query _ stack and queue _ linked list _bilibili _Bilibili
6.Java Object-oriented programming _OOP foundation in-depth explanation
Java Object-oriented programming re-basic in-depth explanation _OOP Object-oriented Java basic dry goods share /JavaSE/ object-oriented programming /OOP programming _bilibili _Bilibili
7.GOF23 Design Patterns – A detailed explanation of design Patterns in 23
GOF23 Design patterns explain _Java GOF23 design patterns detailed course _ from singleton to memo pattern 23 patterns detailed _bilibili _bilibili
All of the above knowledge points step by step to adhere to learning, can achieve Java entry, learning Java foundation, should try to do more, most of the time, you take things for granted, waiting for you to write out the run, you will find that is not the case. Java foundation is a more than knock more practice stage, after learning can quickly review the effect is better.
Recommended for beginners to programming needs to learn the book.
First, Java programming into categories
For programmers with no Java programming experience to get started, just read any introductory books are the same, this stage requires you to quickly grasp the basic Java syntax and basic usage, the purpose is to “whole mouthful of jujube without understanding”, first familiar with Java say. Use a very short time to quickly go through the Java syntax, even meng with guess more writing code, to “know”.
1. Java Programming Ideas
After some experience with Java programming, you need to “know the whys and wheres.” This time “Java programming idea” is a good book to let you know why it is, it has a more clear explanation for the basic object-oriented knowledge, the Java basic syntax, the basic class library has a more clear explanation, can help you play a good Java programming foundation. The shortcoming of this book is really too thick, also more wordy, not suitable for modern fast pace of learning, so see this book to know how to choose, not every chapter every section is worth a look, pick the key of in-depth look can be.
2. Chinese version of Agile Java
One of the main features of this book is unit testing and TDD throughout the book. In the process of teaching you a variety of important Java basics, it will subtly influence your programming thinking towards agility and TDD. In addition, this book is very new, based on the SYNTAX of JDK5.0, to learn the new syntax of JDK5.0 is good. There are choices for the book is very proper, Java language libraries, after all, large, what can say too much, choose the content of the book and the amount of content are all very well, can let you with the least amount of time to master Java is the most important knowledge, and good programming ideas, by the way, it’s a rare book.
Two, Java programming advanced classes
To build a good Java foundation, more practical experience is needed, I think there is no shortcut. There are two books worth reading at this point in your programming career to develop good programming habits and improve the quality of your code.
1. Refactoring improves the design of existing code
This book is very famous, no more introduction, can be more in leisure time to read, and their own practice more mutual verification. The book had a subtle influence on you.
Test Driven Development by Example
The most important feature of this book is that it is very thin and seems to have no burden. You can find a weekend afternoon and read and do it, and you can finish it in a single afternoon, and you have all the examples in this book. The purpose of this book is to help you develop TDD thinking in the real world. There are some more basic books recommended for you
1. Head First Java Development
Head First Java Development is a complete tutorial on object-oriented (OO) programming and Java development. The book is designed to take you from learning the basics of programming languages all the way up to projects that include threading, networking, and distributed applications. Most importantly, you’ll learn how to think like an object-oriented developer. But if you really want to learn Java development well, you’ll need Head First Java Development. This book is one of the top ten books recommended by Amazon editors! This book is highly recommended for beginners.
2. Java Development From Beginner to Master
“Java Development from entry to mastery” this book is mainly aimed at the foundation of Java development, for people who have not learned Java development, it is a good choice. Through this book, you can start from scratch, slowly code and search to learn, and the practice is so much, you will not see the end of the theoretical situation.
3, “Thinking in Java Development” (Chinese name: “Java Development Programming Ideas”)
“Java development programming ideas” can be said to be the most classic Java development, is all Java development programmers must textbook. Whether you are a studying programmer or a programmer who has been working for many years, you can get what you want from this book. This book acts as a textbook and a reference book, just like a dictionary, from which you can look anything you want to know. Although this book is very good, it is not intended for beginners. It is difficult for beginners.
4. “Crazy Java Development Handout”
“Crazy handout” this book is more suitable for self-scholars, the content is more project-based, a lot of practical methods, if you want to carry on the in-depth study of Java development, might as well look at this book.
5. Java Development Core Technology
The book is divided into two parts, the first covering the basics and the second covering the advanced features. Because the content is very hierarchical, so it is very suitable for self-taught students to learn.