Java learning notes -- abnormal knowledge notes

Combine learning and rookie notes ~ attach the website about exceptions in the rookie tutorial https://www.runoob.com/java/java-exceptions.html Why should we handle exceptions? When an exception is encountered during the execution of the program (the exception is usually difficult to solve, such as the disconnection exception caused by unplu ...

Posted by pages on Wed, 09 Feb 2022 23:02:15 +0100

7-1 graphic card sorting game (40 points)

** 7-1 graphic card sorting game (40 points) ** Master the inheritance of classes, the use of polymorphism and the application of interfaces. See [operation instruction] for details Operation instruction v1.07-2020 0.pdf Input format: First, input a string of numbers (1 ~ 4, integers) on one line, where 1 represents circular card, 2 represe ...

Posted by frikus on Wed, 09 Feb 2022 22:39:52 +0100

Basic syntax of learning notes in Java Foundation

Java basics 02 5. Basic grammar (Part 2) 5.1 procedure flow control Process control statements are statements used to control the execution order of statements in the program. Statements can be combined into small logic modules that can complete certain functions. Its process control mode adopts three basic process structures specified ...

Posted by jb489 on Wed, 09 Feb 2022 22:01:41 +0100

Decorator mode of design mode

Decorator mode preface I am a junior undergraduate majoring in software engineering. At present, we are preparing for internship and autumn recruitment. The intended position is java back-end development engineer. To this end, I hosted a project in codecloud to sort out all my knowledge. Contents involved: computer network, operating system, ...

Posted by jack_ on Wed, 09 Feb 2022 20:07:32 +0100

Spring 06 -- proxy pattern and AOP

1, Agent mode The bottom layer of spring AOP Agent mode classification: Static proxyDynamic agent Benefits of agent mode: It can make the operation of real roles more pure, without paying attention to some public businessesThe public business is handed over to the agent role, which realizes the division of businessWhen the public business ...

Posted by mlschutz on Wed, 09 Feb 2022 20:04:35 +0100

Test questions and detailed explanation of the 7th Blue Bridge Cup provincial competition in 2016 (Java undergraduate group A)

Results fill in the blanks (full score 3 points)Results fill in the blanks (full score 5 points)Results fill in the blanks (full score 9 points)Fill in the blank with code (out of 11 points)Fill in the blank with code (Full Score 13 points)Results fill in the blanks (Full Score: 15 points)Results fill in the blanks (Full Score 19 points)Program ...

Posted by keldorn on Wed, 09 Feb 2022 19:58:08 +0100

Java Network Programming -- UDP

UDP UDP protocol is an unreliable network protocol. It establishes a Socket object at both ends of the communication, but these two sockets are only the objects to send and receive data. Therefore, for both sides of communication based on UDP protocol, there is no so-called concept of client and server Java provides DatagramSocket class as a ...

Posted by kwstephenchan on Wed, 09 Feb 2022 19:24:03 +0100

Comparison of network IO models (BIO, NIO, AIO)

IO overview The core of software development is data, and the transmission, storage and reading of data are realized through IO technology. There are three main IO models in Java: BIO synchronous blocking IONIO synchronous non blocking IOAIO asynchronous non blocking IO BIO Blocking IO synchronous blocking IO is a commonly used IO model C ...

Posted by dopey on Wed, 09 Feb 2022 19:18:19 +0100

Java8 Stream improves coding efficiency and leaves work early

Collection data is frequently manipulated in programming. Using Stream in Java8 to process collections, combined with Lambda functional programming, can greatly simplify code. Reasonable use of Stream can improve code readability. On the other hand, since the advent of Java8, the Stream API has been tested by numerous projects, its stability an ...

Posted by bobthebuilder on Wed, 09 Feb 2022 18:39:29 +0100

Design mode - singleton mode

Singleton mode 1. Overview of singleton mode For some classes of a software system, only one instance is very important. For example, a system can only have one window manager or file system, only one timing tool, etc. How to ensure that a class has only one instance and that the instance is easy to access? Defining a unified global variable ...

Posted by mickro on Wed, 09 Feb 2022 17:57:53 +0100