[Yugong series] December 2021 Java Teaching Course 18 - array

1, Array 1.1 array introduction An array is a container for storing data with a fixed length. The data types for storing multiple data should be consistent. 1.2 definition format of array 1.2. 1 first format Data type [] array name Example: int[] arr; double[] arr; char[] arr; 1.2. 2 second format Data type array n ...

Posted by NightFalcon90909 on Tue, 04 Jan 2022 19:01:24 +0100

Java program yuan

Tell the blogger @ of station b to meet the crazy God all the way Java basic video 1, User interaction Scanner 1. Realize the interaction between programs and people. java provides us with a tool class, so we can get the user's input, and we can get the user's input through the Scanner class. 2. Basic grammar: Scanner s = new Scanner(System. ...

Posted by ClarkF1 on Tue, 04 Jan 2022 18:28:27 +0100

Principle of java locks

concept 1. java objects Object header (Object header) 12byte. Object header is composed of Mark word (8byte) and Klass pointer (turn on pointer compression size is 4 byte, pointer to object's metadata, pointer to template of method area class class class). Aligned bytes (consisting of instance data of the object and byte alignment. Because ...

Posted by hungryOrb on Tue, 04 Jan 2022 16:42:55 +0100

OpenJDK System. Analysis of loadlibrary source code

OpenJDK System. Analysis of loadlibrary source code System.loadLibrary is used to inform the JVM to load Native so. After so is loaded successfully, you can see that so has been loaded into memory in / proc/self/maps. Students familiar with system layer development can guess that this is basically equivalent to dlopen/LoadLibrary call. Next, l ...

Posted by drkylec on Tue, 04 Jan 2022 16:36:38 +0100

#Learn Python# Python dictionary with a small hand [source code attached]

Look it up in the dictionary and use the Python dictionaryAfter learning the list and tuple, they are arranged in order, so you can use the index to get the value. What this blog wants to learn is the dictionary. As can be seen from the above, the dictionary can't get the value according to the index, that is, there is no sequential and non seq ...

Posted by felipe_lopes on Tue, 04 Jan 2022 15:18:34 +0100

Double non slag Java, grinding a sword in four years, GC Roots interview

As shown in the following code, a is a local variable in the stack frame. When a = null, because a acts as a GC Root, a is disconnected from the instance new Test(), so the object will be recycled. publicclass Test { public static void main(String[] args) { Test a = new Test(); a = null; } } 2. The object referenced by the ...

Posted by Scutterman on Tue, 04 Jan 2022 14:35:50 +0100

Python module - os module parsing

catalogue 1) Module installation and import 2)os.getcwd() 3)os.listdir(path) 4)os.walk(path) 5)os.path.exists(path) 6)os.mkdir(path) 7)os.rmdir(path) 8)os.path.join(path1,path2) 9)os.path.split(path) 10)os.path.dirname(path) 11)os.path.basename(path) 12)os.path.isdir(path) 13)os.path.isfile(path) 14)os.path.getsize(path) The os ...

Posted by dancing dragon on Tue, 04 Jan 2022 14:12:36 +0100

Java implementation of QQ mail group sending function

In life, when we write java code, we usually try Catch wraps around the code block where exceptions may occur. However, if a java project is too large and a bug occurs at the same time, it is not conducive for us to check the error. So we can use email, write an email tool class ourselves, and use try During catch processing, you can use the ...

Posted by belick on Tue, 04 Jan 2022 13:53:45 +0100

Software experiment course of Shandong University - Ebiten - source code analysis of 2D game library based on go language - learn the window drawing file window in Ebiten go 2021SC@SDUSC

2021SC@SDUSC catalogue 1, WindowSize() function 2, SetWindowSize() function 3, WindowSizeLimits() function 4, IsWindowFloating() function 5, SetWindowFloating() function 6, Maximize window() function 7, SetWindowClosingHandled() function 1, WindowSize() function The code is as follows: func WindowSize() (int, int) { if w := uiDri ...

Posted by reeferd on Tue, 04 Jan 2022 13:38:47 +0100

Django is a small background, and the details are improving a little [with source code]

Django background improvementList page display content modificationIn the last blog, the list data display was realized, but only one column was displayed, and the column title was English. This blog first solved this problem. Modify admin. In the blog folder Py file, the code is as follows:from django.contrib import admin from blog.models imp ...

Posted by waldo on Tue, 04 Jan 2022 13:04:59 +0100