If there is such a cruel day, I accidentally drink the wrong bottle of medicine, all of a sudden erased my programming experience of more than ten years, I became a small white. I want to learn Java by myself and find a job, which I expect will take 6 months. The prerequisite is that I am in a state of efficient study every day and study for at least 12 hours every day.

Even so, I’m sure it won’t be a very good job, just enough to make ends meet. After all, it’s a basic beginner.

If you want to take the next step and actually become an indispensable senior Java engineer, it will take longer, two years, three years, five years, until the bald day.

Thinking about it, I felt it was necessary to prepare for that day, just in case.

01, the first stage, environment and tool preparation

  • Get a computer with Internet access
  • Download and install the JDK to configure the Java development environment
  • Download and configure Maven
  • Download and install IntelliJ IDEA
  • Prepare a GitHub repository (or code cloud) to manage Java source code

Java is a computer programming language. You don’t even have a computer to learn it. I have a relative’s kid who wants to learn programming, but he just reads books. He doesn’t even have a computer at home. He says, “Lay the theoretical foundation first, then practice.”

With a computer, but also have to network, in the process of self-study will certainly encounter a lot of problems, when you encounter problems, first ask the search engine, recommended Google and Bing; If there is no answer really, you can also come to me and apply for joining the technical exchange group and ask the big guys inside the group.

If you want to learn Java, the JDK must be installed first, otherwise Java programs will not compile and execute.

Maven also needs to be installed and configured ahead of time, because later on, there will be some practice projects, which usually require Maven to load third-party libraries.

Use the integrated development environment IntelliJ IDEA to type Java code, which is more popular than Eclipse. Don’t use notepad to write source code, for small white, time is precious, notepad is only suitable for danniu used to install force, not suitable for small white programming (entry), pure waste of time.

With IDEA, after learning the source code, it will be a lot more convenient, including decompiled bytecode.

If English is not very good, it is recommended to install the two IDEA plug-ins: Chinese and Translation.

If you care about coding conventions, you are advised to install two IDEA plugins: Alibaba and SonarLint.

Why do you need a GitHub repository or a code cloud repository? They can be used to synchronize source code online in the cloud to prevent version loss. Finally, you can form a tool library of your own, so you can have wheels and work much more efficiently when you go to work. The code you can use directly will never have to be rewritten.

02, the second stage, Java basic introduction

1) Basic data types

  • 8 basic data types (Boolean, CHAR, byte, short, int, long, float, double)
  • Integer Specifies the value range of byte, short, int, and long
  • Single and double precision
  • Why can’t you compare floating point numbers using “==”
  • The difference between the base type and the wrapper type
  • Automatic unpacking and packing
  • Integer cache mechanism

2) Operator

  • Arithmetic operator
  • Logical operator
  • Comparison operator

3) Flow control statements

  • Conditional branching (if/else/else if, ternary operators, switch)
  • Looping or traversing (for, while, do-while)
  • Break and continue

4) package

  • Create a package
  • Import packages
  • Package name

5) Detailed explanation of main method

  • The public key
  • The static keyword
  • Void keyword
  • The main method
  • String array argument (String[] args)

6) array

  • What is an array?
  • Access to an array
  • Through the array
  • Print the array
  • Variable parameter
  • Sort an array
  • The array becomes a Stream
  • An array becomes a List
  • An array of search
  • java.util.Arrays
  • An array

7) comments

  • Single-line comments
  • Multiline comment
  • Documentation comments
  • Are comments really not executed?
  • Are good programmers really not writing comments

8) String

  • Double quoted strings and new string objects
  • Why are strings immutable?
  • The difference between String, StringBuilder, and StringBuffer
  • Several ways to concatenate strings
  • String constant pool
  • About the intern
  • String comparison (== and equals)
  • String splitting
  • String manipulation tips
  • String shaping
  • UUID generated
  • Can strings be passed by reference?
  • String length
  • About the substring

03. The third stage is Java core technology

1) Object oriented

  • Object oriented and process oriented
  • encapsulation
  • inheritance
  • polymorphism
  • interface
  • An abstract class
  • Rewriting and overloading
  • A constructor
  • Local variables, member variables, static variables, constants
  • Value pass or reference pass
  • The final keyword
  • This keyword
  • The super keyword
  • Immutable object
  • Equals () and hashCode ()
  • Printing Java objects
  • NullPointerException

2) Common tool classes

  • String-related utility classes
  • Date-time related utility classes
  • The enumeration
  • The random number
  • Regular expression
  • Apache Commons tool library
  • Guava tool library

3) Collection framework

  • ArrayList
  • LinkedList
  • The difference between ArrayList and LinkedList
  • Immutable List
  • CopyOnWriteArrayList
  • HashMap
  • LinkedHashMap
  • TreeMap
  • ConcurrentHashMap
  • fail-fast

4) Reflex mechanism

  • What is reflection?
  • What’s the use of reflection?
  • Class Class

5) Exception handling

  • Why do you need an exception handling mechanism?
  • The Error and the Exception
  • try-catch-finally
  • try-with-resource
  • Custom exception
  • Try to catch the original exception
  • Do not print the stack and then throw an exception
  • Do not substitute exception handling for judgment
  • Do not catch exceptions too early

6) notes

  • What are annotations?
  • The life cycle of annotations
  • Annotate the goal of the decoration
  • Custom annotations
  • Using annotations

7) IO streams

  • Character stream, byte stream
  • Input stream, output stream
  • Synchronous and asynchronous
  • Blocking, non-blocking
  • BIO, NIO and AIO
  • NIO 2.0

8) Serialization

  • What are serialization and deserialization
  • How does Java implement serialization and deserialization
  • Serializbale and Externalizable
  • serialVersionUID

9) generic

  • What are generics?
  • Type erasure
  • Problems with generics
  • K, T, V, E
  • The wildcard
  • The upper and lower bound delimiters extends and super
  • Do not use Java primitive types in collections

10) Unit testing

  • Junit
  • TestNG

11) Coding method

  • ASCII
  • Unicode
  • UTF-8
  • GBK, GB2312
  • How to solve the garble problem

12) Concurrent programming

  • What is concurrency
  • What is parallelism
  • What is a thread
  • What is a process
  • Thread state
  • Priority of the thread
  • Create a thread
  • Creating a thread pool
  • What is thread safety
  • Multi-level caching and consistency issues
  • CPU time slices and atomicity issues
  • Instruction rearrangement and order problems
  • Thread safety and memory model
  • happens-before
  • Reentrant lock
  • Blocking locks
  • Optimistic locking
  • Pessimistic locking
  • A distributed lock
  • CAS
  • ABA
  • Biased locking
  • Lightweight lock
  • Heavyweight lock
  • spinlocks
  • What is a deadlock
  • If deadlocks are avoided
  • synchronized
  • volatile
  • ThreadLocal
  • Executors
  • CountDownLatch
  • Thread
  • Runnable
  • Callable
  • ReentrantLock
  • ReentrantReadWriteLock
  • Atomic related classes

13) New Java 8 features

  • Lambda expressions
  • The Stream flow
  • Optional

14) Read the source code

  • String
  • Integer
  • ArrayList
  • LinkedList
  • CopyOnWriteArrayList
  • HashMap
  • TreeMap
  • LinkedHashMap
  • ConcurrentHashMap
  • CopyOnWriteArrayList

04, The fourth stage, Java advanced upgrade

1) the JVM

  • Java memory structure
  • The heap
  • The stack
  • The garbage collection
  • JVM parameter tuning
  • Java Object Model
  • HotSpot
  • Class loading mechanism
  • Compile and decompile
  • Decompiler tool
  • JIT
  • Vm performance monitoring and troubleshooting tools (JPS, JStack, JMAP, Jstat, JConsole, and JavAP)

2) Performance optimization

  • Use the singleton
  • Using thread pools
  • Reduce context switching
  • Reduce lock granularity
  • Data compression
  • Parallel flow Stream
  • The GC tuning
  • JVM memory allocation tuning
  • btrace

3) Design patterns

  • Six principles of design patterns
  • Creative design patterns (singleton, Abstract Factory, Builder, factory, prototype)
  • Structural design patterns (adapter, Bridge, Trim, Composition, Look, share, agent)
  • Behavioral design patterns (template methods, commands, iterators, observers, mediators, memos, interpreters, states, policies, chains of responsibility, visitors)
  • Seven ways of writing singletons

4) Data structure and algorithm

  • Simple data structures (stacks, queues, linked lists, arrays, hashes)
  • Tree (binary tree, dictionary tree, balanced tree, sorting tree, B tree, B+ tree, R tree, red black tree, multipath tree)
  • The heap
  • Graph (topology, directed graph, undirected graph)
  • Stable sorting algorithms (bubble sort, insertion sort, cocktail sort, bucket sort, counting sort, merge sort, in place merge sort, binary sort tree sort, pigeon nest sort, radix sort, dwarf sort, library sort, block sort)
  • Unstable sorting algorithms (selection sort, Hill sort, comb sort, heap sort, smooth sort, quick sort, introspection sort, patient sort, Clover sort)
  • Time complexity
  • Spatial complexity
  • Greedy algorithm
  • KMP algorithm

5) Operating system

  • Common Linux commands (find, top, tar, move, grep, tail, netstat, curl, wget, ping, SSH)
  • Server performance metrics (QPS, CPU utilization)
  • Process synchronization
  • Segmentation and paging
  • Virtual memory and main memory

6) Network security

  • CSRF
  • XSS
  • SQL injection
  • Encryption and decryption (symmetric, asymmetric)
  • MD5, SHA1, DES, RSA
  • DDOS attack
  • HTTP and HTTPS
  • SSL
  • TLS
  • TCP and UDP
  • Cookies, Session
  • CDN
  • DNS

7) Database

  • MySql
  • The index
  • The stored procedure
  • Depots table
  • binlog
  • Reading and writing separation
  • Database cache (Redis, MongoDB)
  • Database Middleware (MyCat)
  • Database Connection Pool (Durid)

8) Big data

  • Search (Elasticsearch, Solr)
  • Streaming computing (Storm, Spark, Flink)
  • Hadoop

9) Server

  • Tomcat
  • jetty
  • Nginx

10) framework

  • Spring
  • MyBatis
  • Spring MVC
  • Spring Boot
  • Spring Security
  • Spring Cloud
  • Netty
  • Dubbo

11) Message queue

  • RabbitMQ
  • Kafka

12) container

  • Docker
  • K8s

If YOU need a Java book list, I found a treasure trove project on GitHub, and just looking at the catalog, it kind of caught my eye.

If you need it, you can help yourself. The address is as follows:

Github.com/itwanger/Ja…

The fifth stage, alive is the most important

There is no end to technology, and learning is not over, the most important thing is to live, not bald.

I don’t know if I’m reading a book or watching a video when I’m getting started. I don’t think adults should do multiple choice. They should do both. Read a book if you like, watch a video if you like.

The most important thing is in the process of self-study, must not be overambitious but underskilled, to actual combat, the technology learned into the project, to solve problems, and then further temper their own technology.

For open source projects, I recommend Mall and VHR on GitHub. The former is an e-commerce system, and the latter is a micro hr system. Both of them use the most advanced technology, and their documents are comprehensive, so they are not afraid of getting confused.

Self-study is the most afraid of the lack of self-drive, we must self-discipline, put an end to “three days of fishing and two days of drying nets”, to the last in vain.

At the same time, we should be patient, do not abandon, do not give up, do not feel sorry for ourselves, give yourself a little encouragement every day, learning momentum will be very strong, not easy to fall asleep.

After learning technology, when looking for a job, we must prepare a resume, don’t go to the sea like a headless fly, easy to “draw water with a sieve”. Use the following links to prepare your resume, which is a stepping stone to finding a job.

After entering Ali, I knew that my resume was written like this

Get the interview invitation, in the interview process must be generous, try to put their own knowledge to express comfortably, do not because it is self-study is not confident, give the interviewer a good impression, the chance of success will be much greater, come on, SAO years!