Home>Network programming tutorial> Java tutorial
All ASP tutorial ASP tutorial ASP.NET tutorial PHP tutorial JSP tutorial C#/CSHARP tutorial XML tutorial Ajax tutorial Perl tutorial Shell tutorial Visual Basic tutorial Delphi tutorial Mobile development tutorial C/C++ tutorial Java tutorial J2EE/J2ME Software engineering
Java tutorial
  • Dive into Java Final

    Dive into Java Final

    The JAVA keyword final is used to modify data, methods or classes, which usually means "unchangeable", that is, data cannot be changed, methods cannot be overridden, and classes cannot be inherited. There are generally two reasons for using fina
    2024-11-19
  • Several methods of page jump in java servlet

    Several methods of page jump in java servlet

    Servlet: Of course, in servlets, jumps generally occur in doGet, doPost and other methods. 1) The redirect method is response.sendRedirect("/a.jsp"); the path of the page is a relative path. sendRedirect can jump to any page, not necessarily lim
    2024-11-19
  • The use of shuffle algorithm in Java

    The use of shuffle algorithm in Java

    Basic idea of ​​FisherYates shuffle (Knuth shuffle): To shuffle an array a of n elements (indices 0..n-1):for i from n − 1 downto 1 doj ← random integer with 0 ≤ j ≤ iexchange a[j] and a[i] The JDK source code is as follows: Copy the code as follows: /***
    2024-11-19
  • How to use Java bitmap sorting

    How to use Java bitmap sorting

    The sorting algorithm of container classes in java JDK mainly uses insertion sort and merge sort. The implementation of different versions may be different. The key code is as follows: Copy the code and the code is as follows: /*** Performs a sort on the
    2024-11-19
  • Analysis of the difference between java_String and StringBuffer

    Analysis of the difference between java_String and StringBuffer

    The string provided by this StringBuffer class is modified. You can use StringBuffer when you know the character data is going to change. Typically, you use StringBuffers to dynamically construct character data. There are three classes in Java that are re
    2024-11-19
  • Example code for batch modifying file names in Java

    Example code for batch modifying file names in Java

    Copy the code as follows: import java.io.*; import java.util.*; public class Test {public static void main(String[] args) throws IOException {BufferedReader br = new BufferedReader(new FileReader("output1.txt" ));List<String> newName = new
    2024-11-19
  • Analysis of the difference between Hashtable and HashMap in java

    Analysis of the difference between Hashtable and HashMap in java

    1. Hashtable is a subclass of Dictionary. The copy code is as follows: public class Hashtable<K,V>extends Dictionary<K,V>implements Map<K,V>, Cloneable, java.io.Serializable HashMap: The copy code is as follows :public class HashMap<K
    2024-11-19
  • Using regular expressions to extract the contents of ( ) in java

    Using regular expressions to extract the contents of ( ) in java

    I encountered a small problem yesterday. I needed to process some users in batches. The format of the users sent from the front desk was as follows. I wanted to extract the content between the brackets (without brackets) Teacher 10 (0010) Teacher 11 (0011
    2024-11-19
  • Solution to how to serialize parent class properties into JSON format in Struts2

    Solution to how to serialize parent class properties into JSON format in Struts2

    Since the project front-end uses Extjs4, list paging needs to return three parameters: totalCount (total number of records), start (starting position), and limit (number of items per page). Since there will be many grids in the project that need paging, I
    2024-11-19
  • Let’s start with building a Struts2 development environment

    Let’s start with building a Struts2 development environment

    Struts2Struts2 is developed based on WebWork2. Like struts1, Struts2 also belongs to the MVC framework. But one thing everyone needs to pay attention to is that although the difference in names between Struts2 and struts1 is not very big, the coding style
    2024-11-19
  • Result set type in Struts2

    Result set type in Struts2

    1. Each action method returns a String type value. The value returned by Struts in a request is determined by this value. 2. In the configuration file, the configuration of each action element must have a result element, and each result corresponds to the
    2024-11-19
  • Struts2 development basic configuration and type conversion

    Struts2 development basic configuration and type conversion

    1. Default values ​​in Action configuration<package name="csdn" namespace="/test" extends="struts-default"><action name="helloworld" method="execute" ><result name="success" "
    2024-11-19
  • 3 XML parsing DOM methods, SAX methods and StAX methods under Java

    3 XML parsing DOM methods, SAX methods and StAX methods under Java

    Let’s briefly talk about the first three methods: DOM method: Personal understanding is similar to .net’s XmlDocument, which is not efficient when parsing, takes up memory, and is not suitable for parsing large XML; SAX method: event-based parsing, when p
    2024-11-19
  • Detailed explanation of type conversion in Struts2

    Detailed explanation of type conversion in Struts2

    1. The significance of type conversion For an intelligent MVC framework, it is inevitable to implement type conversion. Because the request parameters of B/S (browser/server) structure applications are sent to the server through the browser, these paramet
    2024-11-19
  • About internationalization and OGNL expression language

    About internationalization and OGNL expression language

    1. Prepare resource files for internationalization. The naming format of resource files is as follows: baseName_language_country.propertiesbaseName_language.propertiesbaseName.properties where baseName is the basic name of the resource file. We can custom
    2024-11-19