Category:Java

  • What other languages does the JVM support

    Time:2021-3-6

    In order to make Java language have good cross platform ability, Java provides a kind of intermediate code — bytecode, which can be used on all platforms. With bytecode, no matter which platform (such as windows, Linux, etc.), as long as the virtual machine is installed, you can directly run bytecode. Similarly, bytecode also decouples […]

  • Using idea to view jdk8 source code

    Time:2021-3-6

    When using idea to view Oracle JDK 8 source code, it is found that unsafe has no source code. resolvent:Go to openjdk-8 download page:http://jdk.java.net/java-se-ri/8-MR3Download JDK and source code: Open idea – project structure to add JDK and source code: After setting, you can see the unsafe source code

  • Implementation of banker algorithm in Java

    Time:2021-3-6

    This example for you to share the Java banker algorithm specific code, for your reference, the specific content is as follows import java.util.Arrays; import javax.swing.JOptionPane; public class Banker_Dijkstra { Static int available [] = {3,3,2}; // number of available resources Static int Max []] = {{7,5,3}, {3,2,2}, {9,0,2}, {2,2}, {4,3,3}; // maximum demand per thread […]

  • Different versions of web.xml Header information

    Time:2021-3-5

    2.3 <?xml version=”1.0″ encoding=”ISO-8859-1″?> <!DOCTYPE web-app PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN” “http://java.sun.com/dtd/web-app_2_3.dtd”> <web-app> </web-app> 2.4 <?xml version=”1.0″ encoding=”UTF-8″?> <web-app id=”WebApp_9″ version=”2.4″ xmlns=”http://java.sun.com/xml/ns/j2ee” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”> </web-app> 2.5 <?xml version=”1.0″ encoding=”UTF-8″?> <web-app xmlns=”http://java.sun.com/xml/ns/javaee” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd” version=”2.5″> </web-app> JDK version above 1.5 3.0 <?xml version=”1.0″ encoding=”UTF-8″?> <web-app version=”3.0″ xmlns=”http://java.sun.com/xml/ns/javaee” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd”> </web-app> JDK […]

  • Check in function, MySQL or redis?

    Time:2021-3-5

    Now in the development of website and app, sign in is a very common function, such as microblog sign in, send points, sign in leaderboard.       Such as mobile app, check-in and delivery of traffic.     User check-in is an effective means to improve user stickiness, good use can get twice the […]

  • Implementation process diagram of springboot path mapping

    Time:2021-3-5

    This article mainly introduces the implementation process diagram of spring boot path mapping, which is introduced in great detail through the example code. It has a certain reference learning value for everyone’s study or work, and can be referred by friends who need it Of course, this function is not unique to springboot, but springboot […]

  • Implementation of adding digital signature to Java pdf

    Time:2021-3-4

    After the digital signature of the document, people other than the author can not modify it. Therefore, adding digital signature to PDF document can ensure its security and authenticity. At the same time, according to the difference of added content, digital signature can be divided into text digital signature, picture digital signature, picture and text […]

  • Introduction to Java and features of different versions

    Time:2021-3-4

    Java is the general name of java object-oriented programming language and Java platform, which was launched by Sun Microsystems in May 1995. It was jointly developed by James Gosling and his colleagues and officially launched in 1995. Java is divided into three systems Javase (J2SE) (Java2 Platform Standard Edition) Java EE (J2EE) (Java 2 platform, […]

  • Java common class: scanner class

    Time:2021-3-4

    1、 Introduction java.util.Scanner It’s a new feature of Java 5. We can use the scanner class toGet user input。 2、 Creating objects Example: Scanner scanner = new Scanner(System.in); 3、 Common methods I. getting input method: next(): get the next input string. nextLine(): gets the string entered by the user on the next line. The difference […]

  • Integration of springboot and Shiro privilege management

    Time:2021-3-3

    Subject: user principal (give the operation to the security manager)Securitymanager: Security Manager (associated realm)Realm: a bridge for Shiro to connect data rely on Shiro dependency <!– https://mvnrepository.com/artifact/org.apache.shiro/shiro-spring –> <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-spring</artifactId> <version>1.3.2</version> </dependency> Thymeleaf integrates Shiro permission label <!– https://mvnrepository.com/artifact/com.github.theborakompanioni/thymeleaf-extras-shiro –> <dependency> <groupId>com.github.theborakompanioni</groupId> <artifactId>thymeleaf-extras-shiro</artifactId> <version>2.0.0</version> </dependency> Integrating mybatis dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <scope>runtime</scope> </dependency> <!– https://mvnrepository.com/artifact/com.alibaba/druid […]

  • Do you know the four rejection policies of thread pool?

    Time:2021-3-3

    In the previous article, we know the meaning of thread pool parameters, including one parameterhandlerWe said that it is a rejection policy. We will analyze the specific rejection policy of thread pool in this article First of all, we need to understand the function of the rejection policy of the thread pool, which is used […]

  • Implementation of banker algorithm in Java (swing interface)

    Time:2021-3-3

    Java code to achieve the banker’s algorithm, the interface is written in a more detailed way, complete realization of the search for security sequence algorithm function, can be used as a reference to learn the banker’s algorithm. Direct code: ① interface display method: public void ShowFrame() { this.setSize (500, 350); // size this.setAlwaysOnTop(true); this.setResizable (false); […]