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
  • Java custom exception class

    Java custom exception class

    Java custom exception class We need to know that using Java's built-in exception class can describe most exceptions during programming. In addition, we can also extend the Exception class to define our own exception class during programming, and then
    2024-11-08
  • Execution order of return statements in Java try...catch...finally statement (1)

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

    Execution order of return statements in Java try...catch...finally statement (1) In the first case, there is a return statement in the try statement block, but there is no return statement in the catch statement block and finally statement block. The code
    2024-11-08
  • Java strings and character arrays

    Java strings and character arrays

    Java strings and character arrays We already know that the constructors of the String class, String(chara[]) and String(chara[], intoffset, intlength), create string objects using all characters and part of the characters in array a respectively. String……
    2024-11-08
  • String representation of Java objects

    String representation of Java objects

    String representation of Java objects We know from previous studies that all classes are subclasses or indirect subclasses of the Object class in the java.lang package by default. There is a publicStringtoString() method in the Object class. An object can
    2024-11-08
  • Mutual conversion between Java strings and basic data

    Mutual conversion between Java strings and basic data

    Mutual conversion between Java strings and basic data. The Integer class in the java.lang package calls its class method publicstaticintparseInt(Strings) to create a string composed of "numeric" characters, such as "12..."
    2024-11-08
  • Common methods of Java String class (2)

    Common methods of Java String class (2)

    Common methods of the Java String class (2) 5. publicbooleancontains(Strings) The string object calls the contains method to determine whether the current string object contains the string s specified by the parameter, for example: tom =&nbsp
    2024-11-08
  • 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