【专题】Java期末复习资料

Chapter 1: Introduce Java(Java介绍)

1.1. Identifying the Features of Java(识别 Java 的特性)

  • Simple: Java evolved from C++, it eliminates many incomprehensible and confusing features while inheriting most of its grammar rules from C++, so it is easy to use. For example, automatic garbage.
    简单: Java 是从C++演变而来的,它消除了许多难以理解和令人困惑的功能,同时继承了C++的大部分语法规则,因此易于使用。例如,自动垃圾。)
  • collection: When a program creates an object, it needs to allocate memory, and destroy the object after use, Java will complete the task for the programmer.
    集成化: 当程序创建对象时,需要分配内存,使用后销毁对象,Java将为程序员完成任务。)
  • Object-oriented: Java is an object-oriented language and it incorporates the various characteristics of an object-oriented language, such as encapsulation, inheritance and polymorphism.
    面向对象: Java是一种面向对象的语言,它结合了面向对象语言的各种特征,例如封装,继承和多态性。)
  • Portable: Portability refers to the ability of a program to run on any platform without changing the source code of the program. Just because of the platform independence of Java bytecode, Java programs can be ported to any platform that supports JVM.
    可移植性: 可移植性是指程序在不更改程序源代码的情况下在任何平台上运行的能力。仅仅因为Java字节码的平台独立性,Java程序可以移植到任何支持JVM的平台。)
  • Secure: The security model of Java is based on a customizable “sandbox”, in which programs can run safely without potential risks to the system or users.
    安全: Java的安全模型基于可定制的“沙箱”,其中程序可以安全地运行,而不会对系统或用户造成潜在风险。)
  • Robust: Java provides various features, such as memory management and exception handling, which make it a robust programming language.
    健壮: Java提供了各种功能,例如内存管理和异常处理,这使其成为一种健壮的编程语言。)

1.2. Define a File(定义一个文件)

After defining a class, you need to save the file before it can be executed. The following naming conventions should be followed for naming a Java file:
(定义类后,需要先保存文件,然后才能执行该文件。命名 Java 文件时应遵循以下命名约定:)

  • A file name must be unique.
    (文件名必须是唯一的。)
  • A file name cannot be a keyword.
    (文件名不能是关键字。)
  • If a class is specified as public, the file name and class name should be the same.
    (如果将类指定为公共类,则文件名和类名应相同。)
  • If a file contains multiple classes, only one class can be declared as public.
    (如果文件包含多个类,则只能将一个类声明为公共类。)
  • The file name should be the same as the class name that is declared public in the file.
    (文件名应与文件中声明的公共类名相同。)
  • If a file contains multiple classes that are not declared public, any file name can be specified for the file.
    (如果文件包含多个未声明为公共的类,则可以为该文件指定任何文件名。)

每一个源文件有且只有一个piblic类,每个类中有且只有一个main方法。

Chapter 2:Operator(操作符)

2.1. Operator(操作符)

Consider the following expression:
X+Y
In the preceding expression, X and Y are operands, and + is an operator.
(请考虑以下表达式:X+Y在前面的表达式中,XY是操作数,+是运算符。)

2.2. Operator in Java(Java中的操作符)

The following types of operators are supported in Java:(Java支持以下的操作符)

  • Arithmetic operators(算数运算符)
  • Assignment operators(赋值运算符)
  • Comparison operators(比较运算符)
  • Logical operators(逻辑运算符)
  • Ternary operator(三目运算符)
  1. Arithmetic operators are used to perform arithmetic operations on operands.
    算术运算符用于对操作数执行算术运算。)

算数运算符

  • +-*/%

增量运算符

  • +=-=*=%=
  • 只有变量才能使用增量运算符

自增/自减运算符

  • ++--
  • 前置:先使用,后+1;
  • 后置:先+1,后使用。
  1. Comparison operators are used to compare two values and perform an action on the basis of the result of that comparison. Whenever you use a comparison operator, the expression results in the boolean value, true or false.
    比较运算符用于比较两个值,并根据该比较结果执行操作。每当使用比较运算符时,表达式都会生成布尔值truefalse。)
  2. Logical operators are used to evaluate operands and return a boolean value.
    (逻辑运算符用于计算操作数并返回布尔值。)

&&,或 ||,非

三目运算符,选择语句的简化写法
? :

Chapter 3:Statement(语句)

3.1. Select Statement(选择语句)

The decision making technique can be implemented in the Java programs by using the following conditional constructs:
(决策制定技术可以通过使用以下条件构造在 Java 程序中实现:)

  • The if construct(if语句)
  • The if…else construct(if...else语句)
  • The switch construct(switch语句)

The if construct executes statements based on the specified condition. For example, in the Classic Jumble Word game, you needs to display the message, You are correct !!!. To implement the preceding
functionality, you can use the if construct. The syntax for the if construct is:
if构造根据指定的条件执行语句。例如,在经典的混乱单词游戏中,您需要显示消息,You are correct !!!!.实现上述内容功能,您可以使用 if 构造。if 构造的语法为:)

if(expression)
{
//statement(s)
}

In the if construct, statement(s) followed by the if statement will be executed, when expression evaluates to true. However, if expression evaluates to false, statement(s) will be skipped.
(在if结构中,将执行“语句”后跟“if”语句,当表达式计算结果为 true 时。但是,如果表达式的计算结果为 false,则将跳过语句。)

The equals() method is a method of the String class that compares the values of two string objects.
equals() 方法 是 ‘String’ 类的一个方法,用于比较两个字符串对象的值。)

example:(示例)

  • In the preceding example of the Classic Jumble Word game, you want to modify the existing code to displathe message, You are incorrect !!!!, if a user enters the incorrect word for the corresponding jumbled word. For this, you can modify the existing code by using the if…else construct.The if…else construct executes statements based on the specified condition. The syntax for the if…else construct is:
    (在前面的游戏示例中,您希望修改现有代码以消除消息您不正确!!!!,如果用户为相应的混乱单词输入了错误的单词。为此,您可以使用if...else的构造。if...else 构造根据指定的条件执行语句。if...else的构造是:)
if(expression)
{
//statement(s)
}
else
{
//statement(s)
}

3.2. Loop Statement(循环语句)

A looping statement enables you to execute the same statements for a certain number of times.
(循环语句使您能够在一定次数内执行相同的语句。)

  • For this, you do not need to write the statements repeatedly. You can enclose the statements within the loop construct and the loop construct executes the statements till the specified condition is met.
    (为此,您无需重复编写语句。您可以将语句括在循环构造中,循环构造将执行语句,直到满足指定的条件。)

Java supports the following loop constructs:(Java 支持以下循环结构)

  • The for loop(for语句)
  • The while loop(while语句)
  • The do…while loop(do...while语句)

3.2.1. Using the while Construct(使用while语句)

In the preceding example, you can implement the similar functionality with the help of the while loop construct.
(在前面的示例中,您可以借助while循环构造实现类似的功能。)
The while loop construct provides the similar functionality of the for loop construct. However, the syntax for the while loop construct is different from the for loop construct.
(while循环构造提供与for循环构造类似的功能。但是,while循环构造的语法与 for 循环构造不同。)
**The syntax for the while loop construct is:*(while构造的语法)

while(expression)
{
//statement(s)}

In the while loop construct, statement(s) followed by the while statement will be executed, when the expression evaluates to true. The loop continues executing statement(s) until the expression evaluates to false.
(在“while”循环构造中,当表达式的计算结果为 true 时,将执行后跟 while 语句的语句。循环继续执行语句,直到表达式的计算结果为false。)

In the preceding example, you can use the following code snippet of the while loop:(while构造的使用展示)

int count=0;
while(count<5)
{
//statement(s)
count++;
}

In the preceding code snippet, the count variable is initialized with 0. The loop will continue executing statement(s) till the value of the count variable is less than 5.
(在前面的代码片段中,“count”变量初始化为 0。循环将继续执行语句,直到计数变量的值小于 5。)

Chapter 4:Arrays & String(数组和字符串)

4.1. Creating Arrays(创建数组)

You can create the following types of arrays:(你可以创建如下的数组)

  • One-dimensional array(一维数组)
  • Multidimensional array(多维数组)

4.1.1. One-dimensional Array(一维数组)

A one-dimensional array is a collection of elements with a single index value. A one-dimensional array can have multiple columns but only one row.
(一维数组是具有单个索引值的元素集合。一维数组可以有多个列,但只能有一行。)

The creation of a one-dimensional array involves two steps:(一维数组的创建步骤)

  1. Declare an array.(声明一个数组)
  2. Assign values to the array.(为数组进行复制)

Accessing Arrays(访问数组)
To perform various manipulations on the array, you need to access the following types of arrays:(要对数组执行各种操作,您需要访问以下类型的数组:)

  • One-dimensional array(一维数组)
  • Two-dimensional array(二维数组)

To access a one-dimensional array, the following syntax is used:arrayname[index];
要访问一维数组,请使用以下语法:arrayname[index];
In the preceding syntax, arrayname specifies the name of the array and index specifies the location of the array element.
(在前面的语法中,arrayname 指定数组的名称,索引指定数组元素的位置。)
Consider the following code snippet(请考虑以下代码片段:):
String jumbledWords[] = {“alpep”,”argneo”,”rgaeps”}; System.out.println(jumbledWords[0]);
In the preceding code snippet, the jumbledWords array stores the various jumbled words. The statement, System.out.println(jumbledWords[0]);, accesses the element stored in the first index and displays it.
(在前面的代码片段中,jumbledWords数组存储各种混乱的单词。语句 System.out.println(jumbledWords[0]); 访问存储在第一个索引中的元素并显示它。)

4.1.2. Manipulating Strings(操作字符串)

Using String Class(使用字符串类)

  • To store string literals, you can use the String class in the java.lang package. The following code snippet is used to create a string object:
    (要存储字符串文字,可以使用 java.lang 包中的 String 类。以下代码片段用于创建字符串对象)
    String s1 = new String(“Hello”);

The preceding code snippet creates a new string object in the heap memory, with a value, Hello, and assigns it to reference variable, s1. In addition, it creates another string object with the value, Hello, in the string constant pool.
(前面的代码片段在堆内存中创建一个新的字符串对象,其值为 Hello,并将其分配给引用变量 s1。此外,它还在字符串常量池中创建另一个值为 Hello 的字符串对象。)

You can also create a string object by using the following code snippet:(还可以使用以下代码片段创建字符串对象:)
String s1 = “Hello”;

The preceding code snippet creates a new string object with a value, Hello, in the string constant pool and assigns it to the reference variable, s1.
(前面的代码片段在字符串常量池中创建一个值为 Hello 的新字符串对象,并将其分配给引用变量 s1。)
In Java, String class is an immutable class. This means that once a string object is created, you cannot change its value. However, the reference variables of the String class are mutable.
(在Java中,字符串类是一个不可变的类。这意味着一旦创建了字符串对象,就无法更改其值。但是,字符串类的引用变量是可变的。)

Chapter 5:Class(类)

Through agreed get/set accessors, you can encapsulate reading and writing of fields to achieve the purpose of controlling data permissions.
(通过约定的get/set访问器,可以封装字段的读写,达到控制数据权限的目的。)

  • A class can inherit the features of a related class and add new features, as per the requirement.
    (类可以继承相关类的功能,并根据要求添加新功能。)
  • In inheritance, the class that inherits the data members and methods from another class is known as the subclass or derived class.
    (在继承中,从另一个类继承数据成员和方法的类称为子类或派生类。)
  • The class from which the subclass inherits the features is known as the superclass or base class.
    (子类从中继承特征的类称为超类或基类。)
  • In single level inheritance, a single subclass derives the functionality of an existing
    superclass.
    (在单级继承中,单个子类派生现有子类的功能超类。)
  • In multilevel inheritance, a subclass inherits the properties of another subclass.
    (在多级继承中,一个子类继承另一个子类的属性。)
  • In hierarchical inheritance, one or more subclasses are derived from a single superclass.
    (在分层继承中,一个或多个子类派生自单个超类。)
  • An abstract class is a class that contains one or more abstract methods.
    (抽象类是包含一个或多个抽象方法的类。)
  • An abstract class cannot be instantiated but can be inherited by other classes by using the extends keyword.
    (抽象类不能实例化,但可以使用 extend 关键字由其他类继承。)
  • Interfaces contain a set of abstract methods and static and final data members.
    (接口包含一组抽象方法以及静态和最终数据成员。)
  • A class that implements an interface must provide the implementation of all the methods
    declared in that interface.
    (实现接口的类必须提供所有方法的实现
    在该接口中声明。)
  • In Java, polymorphism has the following two types:(在Java中,多态性有以下两种类型:)
    • Static polymorphism(静态多态)
    • Dynamic polymorphism(动态多态)
  • In case of static polymorphism, an entity, such as a method, can exist in multiple forms.
    (在静态多态的情况下,实体(例如方法)可以以多种形式存在。)
  • Dynamic polymorphism is implemented in Java by method overriding.
    (动态多态性在 Java 中通过方法重写实现。)
  • To override a method present in the superclass, the subclass method should have the same, same parameters, and same return type as the method in the superclass.
    (若要重写超类中存在的方法,子类方法应具有与超类中的方法相同的参数和返回类型。)

Chapter 6:Exception(异常)

When a run-time error occurs, an exception is thrown by the JVM which can be handled by an appropriate exception handler.
(当发生运行时错误时,JVM 会抛出异常,该异常可由适当的异常处理程序处理。)

  • To deal with these exceptions, Java provides various built-in exception classes.
    (为了处理这些异常,Java提供了各种内置的异常类)
  • The Throwable class is the base class of exceptions in Java.
    Throwable 类是 Java 中异常的基类)
  • The Exception class represents the conditions that a program should handle.
    (异常类表示程序应处理的条件)
  • The Error class defines the exceptions related to the Java run-time environment.
    (Error 类定义与 Java 运行时环境相关的异常。)
  • Java exceptions are categorized into the following types:(Java 异常分为以下类型)
    • Checked exceptions(检查异常)
    • Unchecked exceptions(未经检查的异常)

You can implement exception handling in a program by using the following keywords and blocks:
(可以使用以下关键字和块在程序中实现异常处理:)

  • try

  • catch

  • throw

  • throws

  • finally

  • A try block encloses the statements that might raise an exception and defines one or more exception handlers associated with it.
    (“try”块包含可能引发异常的语句,并定义与其关联的一个或多个异常处理程序。)

  • In Java, the catch block is used as an exception handler.
    (在 Java 中,“catch”块用作异常处理程序)

  • A try block must have at least one catch block that follows the try block, immediately.
    (try”块必须至少有一个紧跟在 try 块后面的 catch 块)

  • You can throw an exception explicitly, by using the throw keyword.
    (您可以使用 throw 关键字显式“抛出”异常)

  • The throws keyword is used by a method to specify the types of exceptions that the method can throw.
    (方法使用“throws”关键字来指定该方法可以引发的异常类型。)

  • The statements specified in the finally block are executed after the control has left the try-catch block.
    (在“final”块中指定的语句在控件离开 try-catch 块后执行。)

In addition to the built-in exceptions, you can create customized exceptions, as per the application requirements.
(除了内置异常之外,您还可以根据应用程序要求创建自定义异常。)
Assertions are statements in Java that enable you to test any assumptions that you make regarding a program during its execution. You can implement assertions by using the assert keyword provided in Java.
(断言是 Java 中的语句,使您能够测试在程序执行期间对程序所做的任何假设。您可以使用 Java 中提供的 assert 关键字来实现断言。)

Chapter 7:Inner Class(内部类 & 类型转换)

A class defined within another class is called an inner class.(在另一个类中定义的类称为内部类。)
Java provides the following four types of inner classes:(Java 提供了以下四种类型的内部类)

  • Regular inner class(常规内部类)
  • Static inner class(静态内部类)
  • Method-local inner class(局部方法内部类)
  • Anonymous inner class(匿名内部类)

A regular inner class is a class whose definition appears inside the definition of another class. The regular inner class is similar to a member of an outer class.
(常规内部类**是一个类,其定义出现在另一个类的定义中。常规内部类类似于外部类的成员)
Static inner classes are inner classes marked with the static modifier.
(静态内部类是用静态修饰符标记的内部类。)
A method-local inner class is defined inside the method of the enclosing class. Because the class is defined inside a method, it needs to be instantiated within the same method.
(静态内部类是用静态修饰符标记的内部类。)

Java supports the following types of type casting:(Java 支持以下类型的类型转换)

  • Type casting primitive data types
    (类型转换基元数据类型)
  • Type casting objects
  • (类型转换对象)

A primitive data type supports the following types of type casting:
(基元数据类型支持以下类型的类型转换:)

  • Implicit casting(隐式类型转换)
  • Explicit casting(显示强制转换)

隐式类型转换

  • 代码不需要经过如何处理,在编译时,编译器会自动处理。
  • 特点:数据范围小的转为数据范围大的

显式类型转换

  • 当进行操作时,代码需要结果一定的操作才能完成。
  • 特点:数据范围大的转换为数据范围小的

注意事项:
1.不同数字类型的变量之间赋值,表示范围更小的类型能隐式转换成范围较大的类型
2.如果需要把范围大的类型赋值给范围小的,需要强制类型转换,但是可能精度丢失
3.将一个字面值常量进行赋值的时候,Java会自动针对数字范围进行检查
4.强制类型转换不一定能成功,不相干的类型不能互相转换

Implicit conversion refers to an automatic conversion of one data type into another. It occurs if both the data types are compatible with each other.
(隐式转换是指将一种数据类型自动转换为另一种数据类型。如果两种数据类型彼此兼容,则会发生这种情况。)
Explicit conversion occurs when one data type cannot be implicitly converted into another data type.
(当一种数据类型无法隐式转换为另一种数据类型时,会发生显式转换。)
In case of explicit conversion, you must convert the data type into the compatible type.
(在显式转换的情况下,必须将数据类型转换为兼容类型。)
The casting of object references depends on the relationship of the classes involved in the same
(对象引用的强制转换取决于同一类中涉及的类的关系)

Chapter 8:Localization(本地化)

Localization is a process of customizing the application to a specific locale and culture.
(本地化是将应用程序自定义为特定区域设置和区域性的过程。)

  • Localization can be implemented on different types of data, such as date, currency, and text.
    (可以对不同类型的数据(如日期、货币和文本)实施本地化)
  • To localize different types of data, it is necessary to determine the language and country.
    (要本地化不同类型的数据,有必要确定语言和国家)
  • To determine the language, Java provides a predefined set of language codes, such as zh for Chinese and en for English.
    (为了确定语言,Java提供了一组预定义的语言代码,例如zh代表中文,en代表英语。)
  • To work with localization, the Locale class of the java.util package is used.
    (为了进行本地化,使用了 java.util 包的 Locale 类。)
  • To localize the date, you need to use the various date formats. To determine the date format according to the locale, you can use the java.time.format.DateTimeFormatter class.
    (要本地化日期,您需要使用各种日期格式。要根据区域设置确定日期格式,可以使用“java.time.format.DateTimeFormatter”类)

Chapter 9:Interface(接口)

The Set interface is used to create a collection of unique objects.
(Set 接口用于创建唯一对象的集合)

  • The package, java.util, provides the Iterator interface to traverse through the set collection.
    (包 java.util 提供了迭代器接口来遍历集合集合。)
  • The HashSet class provides the implementation of the Set interface that enables you to create a set in which insertion is faster because it does not sort the elements.
    (HashSet 类提供 Set 接口的实现,该接口使您能够创建一个插入速度更快的集合,因为它不对元素进行排序。)
  • The TreeSet class provides the implementation of the Set interface that enables you to create a sorted set of objects.
    (类提供 Set 接口的实现,使您能够创建一组排序的对象。)
  • The List interface is used to create an ordered collection of objects, which can contain duplicate objects.
    (List 接口用于创建对象的有序集合,这些对象可以包含重复的对象。)
  • The package, java.util, provides the ListIterator interface to traverse through the list collection.
    (包 java.util 提供了 ListIterator 接口来遍历列表集合)
  • The ArrayList class provides the implementation of the List interface. The
    ArrayList class enables you to create a resizable array.
    (ArrayList 类提供 List 接口的实现。这
    个类使您能够创建可调整大小的数组)
  • The Vector class is similar to the ArrayList class.
    (Vector 类类似于 ArrayList 类)
  • The methods of the Vector class are synchronized, which means that only one thread at a given time can access it in a multithreaded environment.
    (Vector 类的方法已同步,这意味着在给定时间只有一个线程可以在多线程环境中访问它)
  • The methods of the ArrayList class are not synchronized.
    (ArrayList 类的方法不同步)
  • The Map interface enables you to create a collection with key-value pair objects.
    (Map 接口使您能够创建包含键值对对象的集合)

Chapter 10:Behavior(行为)

Behavior parameterization is the abstraction of behavior into a variable so that it can be passed.
(行为参数化是将行为抽象到变量中,以便可以传递它。)

  • The type of a behavior parameter is defined by a functional interface.
    (行为参数的类型由功能接口定义。)
  • A functional interface is an interface that contains only one method.
    (功能接口是仅包含一个方法的接口)
  • A Lambda expression is an anonymous function that can be used to replace an implementation class of a functional interface.
    (Lambda 表达式是一个匿名函数,可用于替换函数接口的实现类)

Chapter 11:Thread(线程)

A thread is defined as the path of execution of a program. It is a sequence of instructions that is executed to define a unique flow of control.
(线程定义为程序的执行路径。它是为定义唯一的控制流而执行的指令序列)

  • A program that creates two or more threads is called a multi-threaded program. Thread priorities are the integers in the range of 1 to 10 that specify the priority of one thread with respect to the priority of another thread.
    (创建两个或多个线程的程序称为多线程程序。线程优先级是介于 1 到 10 之间的整数,用于指定一个线程相对于另一个线程优先级的优先级)
  • You can set the thread priority after it is created by using the setPriority() method declared in the Thread class.
    (您可以在创建线程优先级后,使用在“线程”类中声明的 setPriority() 方法设置线程优先级)
  • The synchronization of threads ensures that if two or more threads need to access a shared resource, then that resource is used by only one thread at a time.
    (线程同步可确保如果两个或多个线程需要访问共享资源,则该资源一次仅由一个线程使用)

Chapter 12 Input & Output(输入输出)

Java handles all the input and output operations in the form of streams that act as a sequence of bytes or characters traveling from a source to a destination.
(Java 以流的形式处理所有输入和输出操作,这些流充当从源到目标的字节或字符序列)

  • When a stream of data is being sent, it is said to be written; and when a stream of data is being received, it is said to be read.
    (当发送数据流时,称为写入;当接收到数据流时,它被称为被读取)
  • To read data in the form of characters, Java provides the Reader classes inside the java.io package.
    (为了以字符的形式读取数据,Java在“java.io”包中提供了“Reader”类)
  • The FileInputStream class is used to read data and the steams of bytes from the file.
    (“FileInputStream”类用于从文件中读取数据和字节数。)
  • The BufferedInputStream class is used to perform the read operations by using a temporary storage, buffer, in the memory.
    (BufferedInputStream”类用于通过使用内存中的临时存储缓冲区来执行读取操作)
  • The FileReader class is used for reading characters from a file, but it does not define any method of its own.
    (“FileReader”类用于从文件中读取字符,但它没有定义自己的任何方法)
  • The BufferedReader class is used to read the text from a character-input stream, such as a file, console, and array, while buffering characters.
    (BufferedReader”类用于从字符输入流(如文件、控制台和数组)中读取文本,同时缓冲字符)
  • To write the data in the form of bytes, Java provides the OutputStream classes.
    (为了以字节的形式写入数据,Java提供了“OutputStream”类)
  • To write the data in the form of characters, Java provides the Writer classes inside the java.io package.
    (为了以字符的形式写入数据,Java 在“java.io”包中提供了 Writer 类)
  • FileOutputStream is used for writing data, byte by byte, to a file.
    (FileOutputStream”用于逐字节将数据写入文件)

Chapter 13:JDBC(数据库相关)

The classes and interfaces of the JDBC API are defined in the java.sql and javax.sql packages.
(JDBC API 的类和接口在“java.sql”和“javax.sql”包中定义)

  • You can load a driver and register it with the driver manager by using the forName() method or the registerDriver() method.
    (您可以使用“forName()”方法或“registerDriver()”方法加载驱动程序并将其注册到驱动程序管理器。)
  • A Connection object establishes a connection between a Java application and a database.
    (连接”对象在 Java 应用程序和数据库之间建立连接。)
  • A Statement object sends a request and retrieves results to/ from a database.
    (语句”对象向数据库发送请求并从数据库检索结果)
  • You can insert, update, and delete data from a table using the DML statements in Java applications.
    (您可以使用 Java 应用程序中的 DML 语句在表中插入、更新和删除数据)
  • You can create, alter, and drop tables from a database using the DDL statements in Java applications.
    (您可以使用 Java 应用程序中的 DDL 语句从数据库创建、更改和删除表)
  • Once the SQL statements are executed, a ResultSet object stores the result retrieved from a database.
    (执行 SQL 语句后,“ResultSet”对象存储从数据库中检索到的结果)
    —— writing by Pan Qifan(潘琦藩) ——
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
Java 期末复习资料包括以下几个方面: 1. Java基础知识:掌握Java的基本语法、数据类型、运算符、流程控制语句等。 2. 面向对象编程:掌握Java的面向对象编程思想、类与对象、封装、继承、多态、抽象类和接口等。 3. 异常处理:掌握Java中的异常处理机制,包括异常类的层次结构、异常处理语句(try-catch-finally)、throw和throws关键字等。 4. 集合框架:掌握Java中的集合框架,包括List、Set、Map等集合容器,以及它们的特点和使用方法。 5. IO流:掌握Java中的IO流,包括字节流和字符流,文件操作等。 6. 多线程编程:掌握Java中的多线程编程,包括线程的创建和启动、线程同步、线程间通信等。 7. 数据库编程:掌握Java中的数据库编程,包括JDBC API的使用、连接数据库、执行SQL语句等。 以下是一些Java期末复习资料的推荐: 1. 《Head First Java》:这是一本非常适合初学者入门的Java书籍,内容浅显易懂,同时又不失深度,适合用来巩固Java基础知识。 2. 《Java核心技术》:这是一本全面深入的Java教材,可以帮助你系统地学习Java的各种知识点,适合用来提高Java技能水平。 3. 《Java编程思想》:这是一本讲述Java编程思想和技巧的经典书籍,涵盖了Java的基础知识、面向对象编程、异常处理、集合框架、IO流、多线程编程和数据库编程等方面的内容。 4. MOOC网站上的Java课程:例如中国大学MOOC网站上的《Java程序设计》和Coursera网站上的《Java程序设计与软件工程专项课程》,这些课程都提供了免费的在线学习资源和相关练习。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

向懒羊羊学习的大猫

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值