Java IO explains that in detail

  0x01: byte stream Byte stream base class 1. InputStream InputStream: the base class of byte input stream. The abstract class is a superclass representing all classes of byte input stream. Common methods: // Reads the next byte of data from the input stream abstract int read() // A certain number of bytes are read from the input st ...

Posted by hl_tan on Sat, 27 Nov 2021 22:03:31 -0800

Experiment 2 of operating system of Nanjing University of Posts and Telecommunications: mutual exclusion and synchronization of threads

Experimental principle and content Critical area management based on mutual exclusion Using the editor gedit 2_1.c, create a new 2_1.c source file, create two threads to complete the ticket booking operation concurrently, and enter the following example code: #include <stdio.h> #include <pthread.h> #include <unistd.h> int ti ...

Posted by SalientAnimal on Sat, 27 Nov 2021 19:33:26 -0800

Summary of java reflection knowledge points

1. Three ways to obtain class objects hello h = new hello(); //1. Obtain class objects through instance objects Class class1 = h.getClass(); System.out.println(class1); System.out.println(class1.hashCode()); //2. Get class object by object name Class class2 = hello.class; System.out.println(class2); System.out.println(class2.hashCode ...

Posted by castor_troy on Sat, 27 Nov 2021 14:03:43 -0800

Java basics notes summary

1. Overview of arrays and sets Collections and arrays are structures that store multiple data, referred to as Java containers for short. Note: the storage at this time mainly refers to the storage at the memory level, and does not involve persistent storage (. TXT,. JPG,. Avi, in the database). Characteristics of array storage ...

Posted by thebighere on Sat, 27 Nov 2021 12:03:15 -0800

Java Object-Oriented Actual Warfare Simulated Shopping Cart (Day 4)

1. What is object-oriented? stay Java In order to obtain objects, you must first design classes. Class (design drawing): Description of common characteristics of objects; Object: A concrete instance of what really exists The basic format of a class: public class Class name{ 1.Member variables (representing attributes) 2.Member method (repre ...

Posted by coinmagnate@com on Sat, 27 Nov 2021 10:21:26 -0800

Java Reflection: dynamic class loading and overloading

Content index Class loader Class loading system Class loading Dynamic class loading Dynamic class overloading Custom class overload Class load / reload example Java allows you to dynamically load and reload classes at run time, but this function is not as simple and direct as people want. This article will explain how to load and overload cl ...

Posted by semlabs on Fri, 26 Nov 2021 20:05:29 -0800

IO Stream (Byte Stream/Byte Buffer Stream)

IO Flow Concepts IO: Input/Output (input)   /  output) Stream: is an abstract concept, which is the summary of data transmission, that is, the transmission of data between devices is called stream, which is essentially data transmission IO streams are used to process data transfers between devices and are commonly used for fi ...

Posted by jhenary on Fri, 26 Nov 2021 15:42:29 -0800

JavaSE - Chapter 17 new features of Java 8

Chapter 17 Java 8 new features primary coverage Lambda expressionStreamAPIOptional Learning objectives Be able to understand the advantages of functional programming over object-oriented programming Be able to master the standard format of Lambda expression Ability to use Lambda standard format Be able to master the ellipsis format and rul ...

Posted by Hangston on Fri, 26 Nov 2021 06:22:41 -0800

Magic data shuttle Stream API

When we do projects, we often need to integrate and filter the data, and judge after using the for loop every time. I believe you must be tired. Now the Lamda expression newly exited by Java 8 and Steam API can perfectly process the data and complete the function of shuttling between the data. Stream means stream, which is slightly differen ...

Posted by GreenUser on Fri, 26 Nov 2021 00:06:12 -0800

Pygame actual combat: this little game of "happy playing hamster" makes hundreds of millions of people "addicted"“

Introduction ​​ Have nothing to do: The excrement shoveling officer made a hamster toy for the cat owner with waste cardboard boxes. Look, the owner has a lot of fun I knocked it out - eh, why, why are there two? Isn't it exciting? This is a good chance to improve your relationship with the master! ​​ Ha ha ha! After reading the above ...

Posted by jbruns on Thu, 25 Nov 2021 23:51:13 -0800