Java object-oriented programming, package, inheritance, composition, polymorphism, abstract class, interface

Understand java object-oriented programming and basic syntax 1. Package Package is a way to organize classes. The main purpose of using package is to ensure the uniqueness of classes import Import classes in package import java.util.Date; public class Test { public static void main(String[] args) { Date date = new Date(); ...

Added by robert.access on Wed, 10 Nov 2021 18:30:05 +0200

Leetcode--Java--151. Flip the words in the string

Title Description Give you a string s and flip all the words in the string one by one. A word is a string of non whitespace characters. Use at least one space in s to separate words in the string. Please return a string that flips the word order in s and connects it with a single space. explain: The input string s can contain extra spaces befo ...

Added by stevieontario on Fri, 05 Nov 2021 22:34:04 +0200

The initial Java comes from the seventh lesson of Java SE, time complexity and space complexity

catalogue Time complexity and space complexity 1. Algorithm efficiency 2. Time complexity 2.1 concept of time complexity 2.2 progressive representation of large O 2.3 common time complexity calculation examples 3. Space complexity   Time complexity and space complexity 1. Algorithm efficiency There are two kinds of algorithm efficie ...

Added by zeppis on Thu, 04 Nov 2021 13:38:51 +0200

Relationship / attribute / member variable / method / UML diagram of Java objects and classes

The difference between process oriented and object-oriented sketch The process oriented idea is suitable for simple transactions that do not need cooperation. For example, simply driving a car does not need to cooperate with others. The object-oriented idea is suitable for complex transactions, and 1234 steps cannot be listed. Like how to buil ...

Added by amazing on Tue, 02 Nov 2021 16:32:14 +0200

javaSE -- exception handling and text

Exception type     An exception is an object created from an exception class. In this case, the exception class is java.lang.ArithmeticException. The exception is captured by the catch block, and the code block in the catch block is used to handle the exception An exception may be thrown directly through t ...

Added by linkskywalker on Mon, 01 Nov 2021 06:40:19 +0200

javaSE -- Java basic class library

1, Java basic class library Java provides programmers with programming interface API in the form of basic class library JFC (Java Foundation Class). The classes in the class library belong to different packages according to their purposes. 1. Java.lang package The most commonly used packages of Java belong to this package. Programs do not ne ...

Added by phui_99 on Mon, 01 Nov 2021 06:33:28 +0200

Java core technology -- interface, inheritance and polymorphism

1, Class inheritance Inheritance is a very important concept in object-oriented development. It makes the whole program architecture flexible. Reusing some well-defined classes in the program can not only reduce the software development cycle, but also improve the maintainability and expansibility of the software. The extensions keyword is us ...

Added by Boerboel649 on Tue, 26 Oct 2021 15:12:47 +0300

Java learning tutorial from scratch -- six: object-oriented programming

First knowledge of object-oriented Process oriented & object oriented Process oriented thought The steps are clear and simple, what to do in the first step and what to do in the second stepFacing the process, it is suitable to deal with some relatively simple problems Object oriented thought The thinking mode of classification is t ...

Added by Naug on Mon, 11 Oct 2021 20:47:24 +0300

Application of threads and multithreading in Java se

thread Single thread execution path 1, Program, process, thread, CPU Program: a set of instructions written in a certain language to complete a specific task. It refers to a piece of static code. The static code is stored in the hard disk. When the program is executed, the static code becomes a process. Process: the program being exe ...

Added by rline101 on Fri, 08 Oct 2021 07:45:45 +0300

Java realizes the communication between client and server through socket

When learning socket communication in Java, the teacher assigned an assignment and took this opportunity to sort out the relevant knowledge. The topics are as follows: Write client-server program and use Socket technology to realize communication. Both parties agree that the communication port is 6789. Server side function: after receiving the ...

Added by R1der on Wed, 06 Oct 2021 23:32:45 +0300