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
  • About webLucene installation method

    About webLucene installation method

    1. When running the javacc2_1 class, you need to pay attention to the class path to avoid the error of not finding the main function. The most direct way is to run it under the java default path. 2. Two of the classes define the variable enum, which It is
    2024-11-17
  • Common errors and debugging methods of JDBC programs

    Common errors and debugging methods of JDBC programs

    Database: MySQL When writing applications, for the convenience of debugging the program, exception information can be displayed in the exception handling code, so that the code can be debugged according to error prompts. Exception handling code can usuall
    2024-11-17
  • Description of java merge sort algorithm, bubble sort algorithm, selection sort algorithm, insertion sort algorithm, quick sort algorithm

    Description of java merge sort algorithm, bubble sort algorithm, selection sort algorithm, insertion sort algorithm, quick sort algorithm

    An algorithm is a set of well-defined rules used to solve a problem in a limited number of steps. To put it simply, it is the process of computer solving problems. In this process, whether you are forming a problem-solving idea or writing a program, you a
    2024-11-17
  • ConcurrentModificationException in java collection concurrent operation

    ConcurrentModificationException in java collection concurrent operation

    For example, the container Map in Java: for(Person person : pList){ if(person.getGender()==Gender.MALE){ pList.remove(person); //The remove operation cannot be performed during the traversal} } Map is in When traversing, you usually obtain the Set of its
    2024-11-17
  • Some understanding of java String class about ==, equals, null

    Some understanding of java String class about ==, equals, null

    1. String's == and equal() are used to determine the equality of strings. == determines whether the addresses are the same, and equal() determines whether the character values ​​are the same. Most of the time the results of == and equal() are the same
    2024-11-17
  • JAVA hexadecimal and string conversion

    JAVA hexadecimal and string conversion

    toHexString public static String toHexString(int i) returns the string representation of an integer parameter in hexadecimal unsigned integer form. If the argument is negative, the unsigned integer value is the argument plus 232; otherwise it is equal to
    2024-11-17
  • Java reads word-excel-ppt file code

    Java reads word-excel-ppt file code

    WORD:import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.poi.hwpf.extractor.WordExtractor; import java.io.File; import java.io.InputStream; import java.io.FileInputStream; import com.search.code.Index; pu
    2024-11-17
  • Solution to OutOfMemory prompt when using ANT compilation under Eclipse

    Solution to OutOfMemory prompt when using ANT compilation under Eclipse

    The reason why this error occurs is that when ant is executed, the memory given to the JVM by default is not enough. You need to increase the amount of memory allowed to be used by setting startup parameters. If you are executing ANT directly through the
    2024-11-17
  • Encapsulates a Java database access management class

    Encapsulates a Java database access management class

    Copy the code as follows: package com.groundhog.codingmouse; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; /** * Database management class * @author C
    2024-11-17
  • Move all files in the specified folder

    Move all files in the specified folder

    import java.io.File; public class FileMove { /** * Move all files in the specified folder * * @param fromDir * The file directory to be moved * @param toDir * The target file directory * @throws Exception */ public static void fileMove(String from, String
    2024-11-17
  • Java reads and writes files [multiple methods]

    Java reads and writes files [multiple methods]

    Multiple ways to read files in java 1. Read file contents in multiple ways. 1. Read the file content by bytes 2. Read the file content by characters 3. Read the file content by lines 4. Read the file content randomly */ import java.io.BufferedReader; impo
    2024-11-17
  • Very detailed Log4j configuration steps

    Very detailed Log4j configuration steps

    1. Configuration file The basic format of the Log4J configuration file is as follows: Copy the code as follows: #Configure the root Logger log4j.rootLogger = [ level ] , appenderName1 , appenderName2 , … #Configure the log information output destination A
    2024-11-17
  • Comparison and detailed explanation of four xml methods of java operation (DOM, SAX, JDOM, DOM4J)

    Comparison and detailed explanation of four xml methods of java operation (DOM, SAX, JDOM, DOM4J)

    1) DOM (JAXP Crimson Parser) DOM is the official W3C standard for representing XML documents in a platform- and language-independent way. DOM is a collection of nodes or pieces of information organized in a hierarchical structure. This hierarchy allows de
    2024-11-17
  • A piece of tracking eye code that moves the eyes as the mouse moves

    A piece of tracking eye code that moves the eyes as the mouse moves

    Copy the code as follows: import java.applet.Applet; import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.Graphics; import java.awt.Image; import net. java2000.tools.NoNull; /** * A piece of tracking eye code that moves
    2024-11-17
  • MYSQL batch insert data implementation code page 1/3

    MYSQL batch insert data implementation code page 1/3

    @echo off cls set CLASSPATH=../api/jogre.jar set CLASSPATH=%CLASSPATH%;. set CLASSPATH=%CLASSPATH%; classes set CLASSPATH=%CLASSPATH%;lib/dom4j.jar java org.jogre.server. The JogreServer table creation copy code is as follows: create database con_test; us
    2024-11-17