Function method details

Use the loop to let the user enter an integer. If the entered integer is 0, the loop will jump out. The demo code is as follows: package com.txw.test; import java.util.Scanner; public class Test { public static void main(String[]args) { Scanner sc = new Scanner(System.in); while (true){ int n = sc.nextInt(); ...

Posted by hakmir on Wed, 15 Dec 2021 00:37:25 +0100

JavaEE Request Forwarding and Response Redirection

Request Forwarding forword process: Empty the buffer where Response stores response body data.If the target resource is SServlet or JP, their service() method is called to send the result of the response generated by the method to the client. If a static HTML document is in the target resource file system, the data in the document is read ...

Posted by ale_jrb on Tue, 14 Dec 2021 18:44:44 +0100

On Java regular expression

As we all know, regular expressions define the pattern of strings that can be used to search, edit, or process text. It is very convenient for us to use in some specific scenes. It is tantamount to delimiting a range for us so that we can accurately match the results we want. For example, I want to judge whether a file with dozens of pages cont ...

Posted by budder on Thu, 09 Dec 2021 05:19:01 +0100

day07 [Class and Object-Object Memory Map-Encapsulation-Construction Method]

1. Classes and Objects A comparison of object-oriented and process-oriented ideas: Process Oriented: A process-centric programming idea in which each step of functionality is achieved by itself Object-oriented: An object-centric programming idea that implements specific functions by directing objects 1.1 Relationship between Classes and Obj ...

Posted by malam on Wed, 08 Dec 2021 18:40:39 +0100

[source code analysis] there are differences among String, StringBuffer and StringBuilder.

๐ŸŽˆ๐ŸŽˆ๐ŸŽˆ๐ŸŽˆ๐ŸŽˆ Previous recommendations: ๐ŸŽ On the five components of spring MVC and the analysis of execution principle. ๐ŸŽ Quickly learn about Java virtual machine (JVM) and common interview questions (constantly updating...) ๐ŸŽ I am grateful for the experience of this half year and hope to live up to expectations in the future. (Qiu Zhao's exper ...

Posted by Charlie9809 on Tue, 07 Dec 2021 17:58:50 +0100

Object oriented (encapsulation, inheritance, polymorphism)

Object oriented (I) Object oriented overview Object oriented programming is a programming idea in line with human thinking habits. There are various forms of things in real life, and there are various connections between these things. In the program, objects are used to map things in real life, and the relationship between objects is used ...

Posted by sharugan on Tue, 07 Dec 2021 16:01:08 +0100

JavaSE Review Foundation Consolidation

Day 7: Single Collection List ย  Set Talk about the array and compare it with the set before reviewing it Array: Can be seen as a container for storing data. (a contiguous block of memory is created in memory) Characteristic: 1. Fixed length 2. Store fixed data types, store the same type of data, can store basic data types can also store r ...

Posted by TheBentinel.com on Mon, 06 Dec 2021 19:39:41 +0100

day14 multithreading 01

1. Implement multithreading 1.1 simple understanding of multithreading [understanding] It refers to the technology that multiple threads execute concurrently from software or hardware. Computers with multithreading capability can execute multiple threads at the same time due to hardware support, so as to improve performance. [the external ch ...

Posted by artacus on Wed, 01 Dec 2021 05:11:47 +0100

Object Oriented Programming II of Java se

Earlier, we introduced package, inheritance, rewriting and other methods of object-oriented programming. This time, let's take a look at abstract classes and interfaces. catalogue 1. Abstract class Abstract classes cannot be instantiated: Abstract classes can also contain the same members and methods as ordinary classes Because it ca ...

Posted by itazev on Sun, 21 Nov 2021 08:05:30 +0100

9, Java abstract class

Concept: Class: a custom composite data type used to describe a group of things with common properties Class: class keyword creation Public class Hello {} -- > class Abstract class: ย ย  The java class modified by abstract is. Public abstract class Hello {} -- > abstract class 1) Why abstract classes? For example: ย &n ...

Posted by Galia on Fri, 05 Nov 2021 03:04:03 +0100