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 handling exceptions (2) try…catch…finally

    Java handling exceptions (2) try…catch…finally

    Java handles exceptions (2) try...catch...finally. When handling exceptions, we can also use the try...catch...finally statement. When the program executes to the error code, the system will throw an exception object, and the program will enter the catch
    2024-11-08
  • Java handling exceptions (1) try…catch

    Java handling exceptions (1) try…catch

    Java handles exceptions (1) try...catch We have learned about several exceptions in Java before, so how do we handle exceptions? We can use the try...catch statement to handle exceptions, and place possible exception operations in the try part of the try.
    2024-11-08
  • Common exceptions in Java

    Common exceptions in Java

    In addition to the runtime exceptions and non-runtime exceptions mentioned in the previous section, there are many common exceptions in Java, such as: Arithmetic exception: ArithmeticExecption Null pointer exception: NullPointerException Class conversion
    2024-11-08
  • Classification of Java exceptions

    Classification of Java exceptions

    Classification of Java exceptions 1. Throwable class What is the Throwable class? The Throwable class is the super class of all errors or exceptions in the Java language. It is a common class that integrates all exceptions. Its function is to extract the
    2024-11-08
  • Java exception class

    Java exception class

    Java exception class What is an exception? The so-called exceptions are some errors that may occur when the program is running, such as trying to open a file that does not exist at all. Exception handling will change the control flow of the program and gi
    2024-11-08
  • Java anonymous class

    Java anonymous class

    Java Anonymous Classes In the previous section we learned about inner classes, in this section we will learn about anonymous classes. So what is an anonymous class? As the name suggests, anonymous classes are classes that cannot have names. They cannot be
    2024-11-08
  • Java inner classes

    Java inner classes

    Java internal classes Through previous studies, we already know that a class can have two important members: member variables and methods. In fact, a class also has one kind of member: an internal class. When a class defines another class, we call such a
    2024-11-08
  • UML diagram of Java interface

    UML diagram of Java interface

    UML diagram of Java interface The UML diagram representing the interface is similar to the UML diagram representing the class. A rectangle is used to describe the main components of an interface, and the rectangle is divided into three layers vertically.
    2024-11-08
  • 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