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
  • Common methods of Java String class (1)

    Common methods of Java String class (1)

    Common methods of the Java String class (1) 1. publicintlength() Use the length() method in the String class to get the length of a string, for example: String china = &a...
    2024-11-08
  • Java String class

    Java String class

    Java String Class We need to know that when programming, we must often deal with issues related to character sequences. Therefore, the Java language specifically provides the String class for processing character sequences. The String class is in the java
    2024-11-08
  • Java assertion statements

    Java assertion statements

    Java Assertion Statement What should we do if the program is not prepared to handle errors by catching exceptions? We can solve this with assertion statements. Assertion statements are very useful during the debugging stage of code, and are generally used
    2024-11-08
  • Execution order of return statements in Java try...catch...finally statement (4)

    Execution order of return statements in Java try...catch...finally statement (4)

    Execution order of return statements in Java try...catch...finally statement (4) In the fourth case, there are return statements in the try statement block, catch statement block and finally statement block, and there is an exception. The code is as follo
    2024-11-08
  • Execution order of return statements in Java try...catch...finally statement (3)

    Execution order of return statements in Java try...catch...finally statement (3)

    Execution order of return statements in Java try...catch...finally statement (3) In the third case, there are return statements in the try statement block and catch statement block, but there is no return statement in the finally statement block, and ther
    2024-11-08
  • Execution order of return statements in Java try...catch...finally statement (2)

    Execution order of return statements in Java try...catch...finally statement (2)

    Execution order of return statements in Java try...catch...finally statement (2) In the second case, there are return statements in the try statement block and finally statement block, but there is no return statement in the catch statement block. The cod
    2024-11-08
  • Java regular expression

    Java regular expression

    Java regular expression A regular expression contains some strings with special meaning characters. These special characters are called metacharacters in the regular expression. For example: d in "\\dcat" is a metacharacter with special meaning,
    2024-11-08
  • JavaFormatter class

    JavaFormatter class

    Java Formatter Class We all know that programs sometimes need to format numbers, so what is number formatting? The so-called digital formatting is to obtain a string according to the specified format. For example, suppose we want 3.141592 to retain up to
    2024-11-08
  • Java Random class

    Java Random class

    Java Random class Although we can use the Math class to call its class method random() to return a random number between 0 and 1 (excluding 0 and 1), for example: (int)(Math.random()*100)+1 ; //Get between 1 and 100...
    2024-11-08
  • Java BigInteger class (big integer class)

    Java BigInteger class (big integer class)

    Java BigInteger class (large integer class) We need to know that programs sometimes need to deal with large integers, so what should we do? We can use the BigInteger class in the java.math package to provide arbitrary precision integer operations by using
    2024-11-08
  • Java Math class

    Java Math class

    Java Math Class When we write a program, we may need to calculate the square root of a number, or the absolute value, or obtain a random number, etc. The Math class in the java.lang package contains many class methods used for scientific calculations. The
    2024-11-08
  • Java weekday format in different regions

    Java weekday format in different regions

    We need to know the week format in different regions of Java. The abbreviation or full name of the week in different countries is very different. For example, the United States uses Thu (Thursday) for the abbreviation (full name) of Thursday, and Japan us
    2024-11-08
  • Java date formatting method

    Java date formatting method

    Java date formatting method We may want to output the time according to a certain habit, such as the order of time: year, month, Sunday or year, month, Sunday, hours, minutes and seconds. In the early days of Java, SimpleDateFormat, a subclass of DateForm
    2024-11-08
  • Java Calendar class

    Java Calendar class

    Java Calendar class The Calendar class is also in the java.util package. You can initialize a calendar object using the static method getInstance() of the Calendar class, for example: Calendar calendar&am...
    2024-11-08
  • Java Date class

    Java Date class

    The Java Date class may need date, time and other data during programming, so in this section we will introduce the Date class in the java.util package. The Date class can be used to process data related to date and time. 1. Created using the parameterles
    2024-11-08