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
  • Sharing some common methods of strings in Java

    Sharing some common methods of strings in Java

    1. Some common methods of copying strings in Java. The code is as follows:/*** */package com.you.model;/*** @author Administrator* @date 2014-02-24*/public class Replac
    2025-01-21
  • Java simple method to get string pixels

    Java simple method to get string pixels

    The example in this article describes a simple method of obtaining string pixels in Java. Share it with everyone for your reference, the details are as follows: Calculate the pixel length and height of the string: Graphics2D g = (Graphics2D)Toolkit.getDef
    2025-01-21
  • Java example sharing of deleting blank lines from text files

    Java example sharing of deleting blank lines from text files

    Java deletes empty lines in text files. Copy the code as follows: import java.io.BufferedInputStream;import java.io.BufferedReader;import java.io.File;import java.io
    2025-01-21
  • SWT (JFace) experience using ViewForm

    SWT (JFace) experience using ViewForm

    The code is as follows: Copy the code as follows: package swt_jface.demo9; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.ViewForm; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt .widgets.Display; import org.eclipse.swt.widget
    2025-01-21
  • Introduction to Retention, Documented and Inherited of Java annotations

    Introduction to Retention, Documented and Inherited of Java annotations

    Retention annotation The Retention (retention) annotation indicates that this type of annotation will be retained until that stage. There are three values: 1.RetentionPolicy.SOURCE - This type of Annotations is only retained at the source code level and w
    2025-01-21
  • Usage examples of text box (JTextField) and text area (JTextArea) in Java Swing

    Usage examples of text box (JTextField) and text area (JTextArea) in Java Swing

    1: JTextField (text box) usage: JTextField is a lightweight component that allows editing of a single line of text. 1. Common construction methods of JTextField: JTextField() constructs a new TextField. JTextField(int colu
    2025-01-20
  • How to compare whether the elements in two arrays are the same in Java

    How to compare whether the elements in two arrays are the same in Java

    Hahaha, how do you implement the function of comparing whether the elements in two arrays are the same in Java? Look at the simplest method below: Copy the code. The code is as follows: import java.util.Arrays; public class Test { /** * How to compare ele
    2025-01-20
  • Electronic photo album developed based on spring+hibernate+JQuery (with source code download)

    Electronic photo album developed based on spring+hibernate+JQuery (with source code download)

    Project structure: Project homepage: Registration page: Upload pictures: Rendering one: Rendering two: Rendering three: ============================ ===================================The following is the code part============ ============================
    2025-01-20
  • Java uses TimerTask timer to obtain specified network data

    Java uses TimerTask timer to obtain specified network data

    Copy the code as follows: import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL;i
    2025-01-20
  • Method code for replacing HTML tags in Java

    Method code for replacing HTML tags in Java

    1. Replace the HTML tag copy code. The code is as follows: replaceAll("//&[a-zA-Z]{0,9};", "").replaceAll("<[^>]*>", "/n /t") The source code is as follows: Copy the code as follows:/*** String replacem
    2025-01-20
  • java study notes (introduction)_java program helloWorld

    java study notes (introduction)_java program helloWorld

    After installing and configuring Java's jdk, let's start writing the first java program--hello World. It is used to output "Hello World" on the console. First, we use the most primitive method, which is to use a text editor to write code
    2025-01-20
  • Sharing some writing methods for List and Map initialization in Java

    Sharing some writing methods for List and Map initialization in Java

    Before Java discovered new writing methods, I always initialized List and Map like this: Copy the code. The code is as follows: //Initialize ListList<string> list = new ArrayList</string><string> ();list.add("www
    2025-01-20
  • Java concurrent programming example (3): thread interruption

    Java concurrent programming example (3): thread interruption

    In a multi-threaded Java program, the entire program will not exit until all threads have completed execution. (It should be noted that execution of all non-daemon threads is completed; if a thread executes the System.exit() method, the program will also
    2025-01-20
  • Example analysis of usage of this keyword in java

    Example analysis of usage of this keyword in java

    The example in this article describes the usage of this keyword in java and is shared with everyone for your reference. The specific analysis is as follows: 1. Scope of use of this 1. The this keyword used in the class method definition represents the ref
    2025-01-20
  • 15 Advanced Java Multithreading Interview Questions and Answers

    15 Advanced Java Multithreading Interview Questions and Answers

    Java Threading Interview Questions Multi-threading and concurrency issues are an essential part of any Java interview. If you want to get a front-office information position at any stock investment bank, then you should be prepared with a lot of questions
    2025-01-20