{"version":"d2ccc593f35a","banks":[{"id":"java","name":"Java 程序设计","shortName":"JAVA","subtitle":"从基础语法到面向对象，把每一个知识点学扎实。","source":"Java单选题100题_整理与答案.md","questions":[{"id":"java-q1","number":1,"type":"choice","chapter":"Java 基础与开发环境","title":"Java 源程序文件通常使用的扩展名是（　）。","titleHtml":"Java 源程序文件通常使用的扩展名是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":".class","html":"<p><code>.class</code></p>"},{"key":"B","text":".jar","html":"<p><code>.jar</code></p>"},{"key":"C","text":".java","html":"<p><code>.java</code></p>"},{"key":"D","text":".exe","html":"<p><code>.exe</code></p>"}],"answer":"C","answerText":"C .java","explanation":"Java 源代码通常保存为 .java 文件；编译后的字节码通常是 .class 文件。","explanationHtml":"<p>Java 源代码通常保存为 <code>.java</code> 文件；编译后的字节码通常是 <code>.class</code> 文件。</p>","important":false},{"id":"java-q2","number":2,"type":"choice","chapter":"Java 基础与开发环境","title":"在命令行中编译 Java 源文件 Hello.java，应使用的命令是（　）。","titleHtml":"在命令行中编译 Java 源文件 Hello.java，应使用的命令是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"java Hello.java","html":"<p><code>java Hello.java</code></p>"},{"key":"B","text":"jar Hello.java","html":"<p><code>jar Hello.java</code></p>"},{"key":"C","text":"jdb Hello.java","html":"<p><code>jdb Hello.java</code></p>"},{"key":"D","text":"javac Hello.java","html":"<p><code>javac Hello.java</code></p>"}],"answer":"D","answerText":"D javac Hello.java","explanation":"javac 是 Java 编译器命令，负责把源文件编译为字节码。","explanationHtml":"<p><code>javac</code> 是 Java 编译器命令，负责把源文件编译为字节码。</p>","important":false},{"id":"java-q3","number":3,"type":"choice","chapter":"Java 基础与开发环境","title":"Java 应用程序主方法的标准声明是（　）。","titleHtml":"Java 应用程序主方法的标准声明是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"public void main(String[] args)","html":"<p><code>public void main(String[] args)</code></p>"},{"key":"B","text":"public static void main(String[] args)","html":"<p><code>public static void main(String[] args)</code></p>"},{"key":"C","text":"public static main(String[] args)","html":"<p><code>public static main(String[] args)</code></p>"},{"key":"D","text":"static void main()","html":"<p><code>static void main()</code></p>"}],"answer":"B","answerText":"B public static void main(String[] args)","explanation":"传统标准入口方法是 public static void main(String[] args)，其中 static 表示无需创建对象即可调用。","explanationHtml":"<p>传统标准入口方法是 <code>public static void main(String[] args)</code>，其中 <code>static</code> 表示无需创建对象即可调用。</p>","important":false},{"id":"java-q4","number":4,"type":"choice","chapter":"Java 基础与开发环境","title":"从组成关系看，下列关于 JDK、JRE 和 JVM 的描述正确的是（　）。","titleHtml":"从组成关系看，下列关于 JDK、JRE 和 JVM 的描述正确的是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"JDK 包含 JRE，JRE 包含 JVM","html":"<p>JDK 包含 JRE，JRE 包含 JVM</p>"},{"key":"B","text":"JRE 包含 JDK，JDK 包含 JVM","html":"<p>JRE 包含 JDK，JDK 包含 JVM</p>"},{"key":"C","text":"JDK 只包含 JVM，不包含 JRE","html":"<p>JDK 只包含 JVM，不包含 JRE</p>"},{"key":"D","text":"JVM 包含 JDK 和 JRE","html":"<p>JVM 包含 JDK 和 JRE</p>"}],"answer":"A","answerText":"A JDK 包含 JRE，JRE 包含 JVM","explanation":"按照常见的概念关系，JDK 包含运行环境，JRE 包含 JVM；新版本 JDK 的实际目录结构可能不同。","explanationHtml":"<p>按照常见的概念关系，JDK 包含运行环境，JRE 包含 JVM；新版本 JDK 的实际目录结构可能不同。</p>","important":false},{"id":"java-q5","number":5,"type":"choice","chapter":"Java 基础与开发环境","title":"下列各项中，不属于 Java 语言特点的是（　）。","titleHtml":"下列各项中，不属于 Java 语言特点的是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"支持运算符重载","html":"<p>支持运算符重载</p>"},{"key":"B","text":"面向对象","html":"<p>面向对象</p>"},{"key":"C","text":"跨平台","html":"<p>跨平台</p>"},{"key":"D","text":"自动垃圾回收","html":"<p>自动垃圾回收</p>"}],"answer":"A","answerText":"A 支持运算符重载","explanation":"Java 不支持用户自定义的运算符重载；面向对象、跨平台和自动垃圾回收都是其典型特点。","explanationHtml":"<p>Java 不支持用户自定义的运算符重载；面向对象、跨平台和自动垃圾回收都是其典型特点。</p>","important":false},{"id":"java-q6","number":6,"type":"choice","chapter":"Java 基础与开发环境","title":"Hello.class 已经存在，执行命令 java Hello 时，下列说法正确的是（　）。","titleHtml":"Hello.class 已经存在，执行命令 java Hello 时，下列说法正确的是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"重新编译 Hello.java 并生成新的字节码","html":"<p>重新编译 Hello.java 并生成新的字节码</p>"},{"key":"B","text":"启动 JVM，加载并运行 Hello 类的 main 方法","html":"<p>启动 JVM，加载并运行 Hello 类的 main 方法</p>"},{"key":"C","text":"只检查 Hello.java 的语法，不执行程序","html":"<p>只检查 Hello.java 的语法，不执行程序</p>"},{"key":"D","text":"把 Hello.class 反编译为 Hello.java","html":"<p>把 Hello.class 反编译为 Hello.java</p>"}],"answer":"B","answerText":"B 启动 JVM，加载并运行 Hello 类的 main 方法","explanation":"java Hello 启动 JVM，加载 Hello 类并执行其入口方法，而不是重新编译源码。","explanationHtml":"<p><code>java Hello</code> 启动 JVM，加载 <code>Hello</code> 类并执行其入口方法，而不是重新编译源码。</p>","important":false},{"id":"java-q7","number":7,"type":"choice","chapter":"Java 基础与开发环境","title":"源文件 Hello.java 中定义了 public class Hello。若把文件名改为 Test.java 后再编译，结果是（　）。","titleHtml":"源文件 Hello.java 中定义了 public class Hello。若把文件名改为 Test.java 后再编译，结果是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"编译成功，生成 Hello.class","html":"<p>编译成功，生成 Hello.class</p>"},{"key":"B","text":"编译成功，生成 Test.class","html":"<p>编译成功，生成 Test.class</p>"},{"key":"C","text":"编译错误，public 类名必须与源文件名一致","html":"<p>编译错误，public 类名必须与源文件名一致</p>"},{"key":"D","text":"编译成功，但运行时必须使用 Test 类名","html":"<p>编译成功，但运行时必须使用 Test 类名</p>"}],"answer":"C","answerText":"C 编译错误，public 类名必须与源文件名一致","explanation":"顶级 public 类 Hello 必须声明在名为 Hello.java 的源文件中。","explanationHtml":"<p>顶级 <code>public</code> 类 <code>Hello</code> 必须声明在名为 <code>Hello.java</code> 的源文件中。</p>","important":false},{"id":"java-q8","number":8,"type":"choice","chapter":"Java 基础与开发环境","title":"在 Windows 中配置 JDK 时，环境变量 JAVA_HOME 通常应指向（　）。","titleHtml":"在 Windows 中配置 JDK 时，环境变量 JAVA_HOME 通常应指向（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"JDK 安装目录下的 bin 目录","html":"<p>JDK 安装目录下的 bin 目录</p>"},{"key":"B","text":"任意一个包含 .java 文件的目录","html":"<p>任意一个包含 .java 文件的目录</p>"},{"key":"C","text":"项目的 src 目录","html":"<p>项目的 src 目录</p>"},{"key":"D","text":"JDK 的安装根目录","html":"<p>JDK 的安装根目录</p>"}],"answer":"D","answerText":"D JDK 的安装根目录","explanation":"JAVA_HOME 一般设置为 JDK 的安装根目录；需要使用命令行工具时，通常将其 bin 目录加入 PATH。","explanationHtml":"<p><code>JAVA_HOME</code> 一般设置为 JDK 的安装根目录；需要使用命令行工具时，通常将其 <code>bin</code> 目录加入 <code>PATH</code>。</p>","important":false},{"id":"java-q9","number":9,"type":"choice","chapter":"Java 基础与开发环境","title":"Java 能够实现“一次编写，到处运行”，主要原因是（　）。","titleHtml":"Java 能够实现“一次编写，到处运行”，主要原因是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"Java 源程序无需编译即可在所有操作系统上直接运行","html":"<p>Java 源程序无需编译即可在所有操作系统上直接运行</p>"},{"key":"B","text":"JDK 会为每个操作系统自动生成对应的 .exe 文件","html":"<p>JDK 会为每个操作系统自动生成对应的 .exe 文件</p>"},{"key":"C","text":"Java 语言没有数据类型，因此不存在平台差异","html":"<p>Java 语言没有数据类型，因此不存在平台差异</p>"},{"key":"D","text":"Java 源程序被编译为平台无关的字节码，由各平台上的 JVM 负责执行","html":"<p>Java 源程序被编译为平台无关的字节码，由各平台上的 JVM 负责执行</p>"}],"answer":"D","answerText":"D Java 源程序被编译为平台无关的字节码，由各平台上的 JVM 负责执行","explanation":"源码编译为平台无关的字节码，操作系统上对应的 JVM 执行字节码。","explanationHtml":"<p>源码编译为平台无关的字节码，操作系统上对应的 JVM 执行字节码。</p>","important":false},{"id":"java-q10","number":10,"type":"choice","chapter":"Java 基础与开发环境","title":"某源文件首行为 package com.demo;，编译后的 Hello.class 位于 com\\demo 目录中。在 com 目录的父目录下，运行该类的正确命令是（　）。","titleHtml":"某源文件首行为 package com.demo;，编译后的 Hello.class 位于 com\\demo 目录中。在 com 目录的父目录下，运行该类的正确命令是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"java com\\demo\\Hello.java","html":"<p><code>java com\\demo\\Hello.java</code></p>"},{"key":"B","text":"javac com.demo.Hello","html":"<p><code>javac com.demo.Hello</code></p>"},{"key":"C","text":"java com.demo.Hello","html":"<p><code>java com.demo.Hello</code></p>"},{"key":"D","text":"java Hello","html":"<p><code>java Hello</code></p>"}],"answer":"C","answerText":"C java com.demo.Hello","explanation":"包中的类应使用完全限定类名 com.demo.Hello 启动，且类路径根目录应是 com 的父目录。","explanationHtml":"<p>包中的类应使用完全限定类名 <code>com.demo.Hello</code> 启动，且类路径根目录应是 <code>com</code> 的父目录。</p>","important":false},{"id":"java-q11","number":11,"type":"choice","chapter":"基础语法、数组与流程控制","title":"下列标识符中，合法的是（　）。","titleHtml":"下列标识符中，合法的是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"2sum","html":"<p><code>2sum</code></p>"},{"key":"B","text":"sum-1","html":"<p><code>sum-1</code></p>"},{"key":"C","text":"class","html":"<p><code>class</code></p>"},{"key":"D","text":"_sum1","html":"<p><code>_sum1</code></p>"}],"answer":"D","answerText":"D _sum1","explanation":"标识符不能以数字开头、不能含减号、不能使用关键字；_sum1 符合规则。","explanationHtml":"<p>标识符不能以数字开头、不能含减号、不能使用关键字；<code>_sum1</code> 符合规则。</p>","important":false},{"id":"java-q12","number":12,"type":"choice","chapter":"基础语法、数组与流程控制","title":"下列单词中，属于 Java 关键字的是（　）。","titleHtml":"下列单词中，属于 Java 关键字的是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"class","html":"<p><code>class</code></p>"},{"key":"B","text":"String","html":"<p><code>String</code></p>"},{"key":"C","text":"main","html":"<p><code>main</code></p>"},{"key":"D","text":"args","html":"<p><code>args</code></p>"}],"answer":"A","answerText":"A class","explanation":"class 是定义类的关键字，String 是类名，main 和 args 不是关键字。","explanationHtml":"<p><code>class</code> 是定义类的关键字，<code>String</code> 是类名，<code>main</code> 和 <code>args</code> 不是关键字。</p>","important":false},{"id":"java-q13","number":13,"type":"choice","chapter":"基础语法、数组与流程控制","title":"Java 中单行注释的正确写法是（　）。","titleHtml":"Java 中单行注释的正确写法是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"/ 注释内容 /","html":"<p><code>/* 注释内容 */</code></p>"},{"key":"B","text":"// 注释内容","html":"<p><code>// 注释内容</code></p>"},{"key":"C","text":"（原文件缺失）","html":"<p>（原文件缺失）</p>"},{"key":"D","text":"# 注释内容","html":"<p><code># 注释内容</code></p>"}],"answer":"B","answerText":"B // 注释内容","explanation":"Java 单行注释以 // 开始；/ ... / 属于块注释语法。原文件缺少 C 选项。","explanationHtml":"<p>Java 单行注释以 <code>//</code> 开始；<code>/* ... */</code> 属于块注释语法。原文件缺少 C 选项。</p>","important":true},{"id":"java-q14","number":14,"type":"choice","chapter":"基础语法、数组与流程控制","title":"下列语句中，正确声明了一个 double 类型符号常量的是（　）。","titleHtml":"下列语句中，正确声明了一个 double 类型符号常量的是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"const double PI = 3.14;","html":"<p><code>const double PI = 3.14;</code></p>"},{"key":"B","text":"final double PI = 3.14;","html":"<p><code>final double PI = 3.14;</code></p>"},{"key":"C","text":"static PI = 3.14;","html":"<p><code>static PI = 3.14;</code></p>"},{"key":"D","text":"int PI = 3.14;","html":"<p><code>int PI = 3.14;</code></p>"}],"answer":"B","answerText":"B final double PI = 3.14;","explanation":"使用 final 修饰变量可限制其再次赋值；const 不是 Java 中使用的变量声明关键字。","explanationHtml":"<p>使用 <code>final</code> 修饰变量可限制其再次赋值；<code>const</code> 不是 Java 中使用的变量声明关键字。</p>","important":false},{"id":"java-q15","number":15,"type":"choice","chapter":"基础语法、数组与流程控制","title":"Java 中字面量 3.14 的默认数据类型是（　）。","titleHtml":"Java 中字面量 3.14 的默认数据类型是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"double","html":"<p><code>double</code></p>"},{"key":"B","text":"float","html":"<p><code>float</code></p>"},{"key":"C","text":"int","html":"<p><code>int</code></p>"},{"key":"D","text":"long","html":"<p><code>long</code></p>"}],"answer":"A","answerText":"A double","explanation":"没有 f 或 F 后缀的十进制浮点字面量默认是 double。","explanationHtml":"<p>没有 <code>f</code> 或 <code>F</code> 后缀的十进制浮点字面量默认是 <code>double</code>。</p>","important":false},{"id":"java-q16","number":16,"type":"choice","chapter":"基础语法、数组与流程控制","title":"将 double 值 3.9 转换为 int 并赋给变量 x，正确的语句是（　）。","titleHtml":"将 double 值 3.9 转换为 int 并赋给变量 x，正确的语句是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"int x = 3.9;","html":"<p><code>int x = 3.9;</code></p>"},{"key":"B","text":"int x = (int) 3.9;","html":"<p><code>int x = (int) 3.9;</code></p>"},{"key":"C","text":"int x = 3.9f;","html":"<p><code>int x = 3.9f;</code></p>"},{"key":"D","text":"int x = Integer(3.9);","html":"<p><code>int x = Integer(3.9);</code></p>"}],"answer":"B","answerText":"B int x = (int) 3.9;","explanation":"从 double 到 int 属于窄化转换，需要显式强制转换；结果为 3，不会四舍五入。","explanationHtml":"<p>从 <code>double</code> 到 <code>int</code> 属于窄化转换，需要显式强制转换；结果为 <code>3</code>，不会四舍五入。</p>","important":false},{"id":"java-q17","number":17,"type":"choice","chapter":"基础语法、数组与流程控制","title":"表达式 10 / 3 的值是（　）。","titleHtml":"表达式 10 / 3 的值是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"3.33","html":"<p><code>3.33</code></p>"},{"key":"B","text":"4","html":"<p><code>4</code></p>"},{"key":"C","text":"1","html":"<p><code>1</code></p>"},{"key":"D","text":"3","html":"<p><code>3</code></p>"}],"answer":"D","answerText":"D 3","explanation":"两个 int 相除仍执行整数除法，10 / 3 舍弃小数部分得到 3。","explanationHtml":"<p>两个 <code>int</code> 相除仍执行整数除法，<code>10 / 3</code> 舍弃小数部分得到 <code>3</code>。</p>","important":false},{"id":"java-q18","number":18,"type":"choice","chapter":"基础语法、数组与流程控制","title":"表达式 10 % 3 的值是（　）。","titleHtml":"表达式 10 % 3 的值是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"0","html":"<p><code>0</code></p>"},{"key":"B","text":"3","html":"<p><code>3</code></p>"},{"key":"C","text":"1","html":"<p><code>1</code></p>"},{"key":"D","text":"3.33","html":"<p><code>3.33</code></p>"}],"answer":"C","answerText":"C 1","explanation":"% 返回整数除法的余数，10 = 3 × 3 + 1。","explanationHtml":"<p><code>%</code> 返回整数除法的余数，<code>10 = 3 × 3 + 1</code>。</p>","important":false},{"id":"java-q19","number":19,"type":"choice","chapter":"基础语法、数组与流程控制","title":"逻辑表达式 true && false 的值是（　）。","titleHtml":"逻辑表达式 true &amp;&amp; false 的值是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"true","html":"<p><code>true</code></p>"},{"key":"B","text":"编译错误","html":"<p>编译错误</p>"},{"key":"C","text":"false","html":"<p><code>false</code></p>"},{"key":"D","text":"1","html":"<p><code>1</code></p>"}],"answer":"C","answerText":"C false","explanation":"逻辑与 && 要求两边均为 true 才为真，因此结果为 false。","explanationHtml":"<p>逻辑与 <code>&amp;&amp;</code> 要求两边均为 <code>true</code> 才为真，因此结果为 <code>false</code>。</p>","important":false},{"id":"java-q20","number":20,"type":"choice","chapter":"基础语法、数组与流程控制","title":"下列创建长度为 5 的 int 数组的语句中，正确的是（　）。","titleHtml":"下列创建长度为 5 的 int 数组的语句中，正确的是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"int a[5];","html":"<p><code>int a[5];</code></p>"},{"key":"B","text":"int[] a = new int(5);","html":"<p><code>int[] a = new int(5);</code></p>"},{"key":"C","text":"int a = new int[5];","html":"<p><code>int a = new int[5];</code></p>"},{"key":"D","text":"int[] a = new int[5];","html":"<p><code>int[] a = new int[5];</code></p>"}],"answer":"D","answerText":"D int[] a = new int[5];","explanation":"定义数组时方括号表示数组类型，new int[5] 才表示创建长度为 5 的整型数组。","explanationHtml":"<p>定义数组时方括号表示数组类型，<code>new int[5]</code> 才表示创建长度为 5 的整型数组。</p>","important":false},{"id":"java-q21","number":21,"type":"choice","chapter":"基础语法、数组与流程控制","title":"Java 数组第一个元素的索引是（　）。","titleHtml":"Java 数组第一个元素的索引是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"1","html":"<p><code>1</code></p>"},{"key":"B","text":"-1","html":"<p><code>-1</code></p>"},{"key":"C","text":"0","html":"<p><code>0</code></p>"},{"key":"D","text":"数组长度","html":"<p>数组长度</p>"}],"answer":"C","answerText":"C 0","explanation":"Java 数组从索引 0 开始，最后一个有效索引是 length - 1。","explanationHtml":"<p>Java 数组从索引 <code>0</code> 开始，最后一个有效索引是 <code>length - 1</code>。</p>","important":false},{"id":"java-q22","number":22,"type":"choice","chapter":"基础语法、数组与流程控制","title":"执行 int[] a = {1, 2, 3}; 后，a.length 的值是（　）。","titleHtml":"执行 int[] a = {1, 2, 3}; 后，a.length 的值是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"2","html":"<p><code>2</code></p>"},{"key":"B","text":"4","html":"<p><code>4</code></p>"},{"key":"C","text":"编译错误","html":"<p>编译错误</p>"},{"key":"D","text":"3","html":"<p><code>3</code></p>"}],"answer":"D","answerText":"D 3","explanation":"数组初始化器中有三个元素，所以 a.length 为 3。","explanationHtml":"<p>数组初始化器中有三个元素，所以 <code>a.length</code> 为 <code>3</code>。</p>","important":false},{"id":"java-q23","number":23,"type":"choice","chapter":"基础语法、数组与流程控制","title":"在 Java 中，if 语句的条件表达式类型必须是（　）。","titleHtml":"在 Java 中，if 语句的条件表达式类型必须是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"int","html":"<p><code>int</code></p>"},{"key":"B","text":"String","html":"<p><code>String</code></p>"},{"key":"C","text":"任意类型","html":"<p>任意类型</p>"},{"key":"D","text":"boolean","html":"<p><code>boolean</code></p>"}],"answer":"D","answerText":"D boolean","explanation":"Java 的 if 条件必须是 boolean 表达式，不接受整数代替布尔值。","explanationHtml":"<p>Java 的 <code>if</code> 条件必须是 <code>boolean</code> 表达式，不接受整数代替布尔值。</p>","important":false},{"id":"java-q24","number":24,"type":"choice","chapter":"基础语法、数组与流程控制","title":"循环 for (int i = 0; i < 3; i++) 的循环体将执行（　）。","titleHtml":"循环 for (int i = 0; i &lt; 3; i++) 的循环体将执行（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"3 次","html":"<p>3 次</p>"},{"key":"B","text":"2 次","html":"<p>2 次</p>"},{"key":"C","text":"4 次","html":"<p>4 次</p>"},{"key":"D","text":"0 次","html":"<p>0 次</p>"}],"answer":"A","answerText":"A 3 次","explanation":"循环变量依次为 0、1、2，共执行三次。","explanationHtml":"<p>循环变量依次为 <code>0、1、2</code>，共执行三次。</p>","important":false},{"id":"java-q25","number":25,"type":"choice","chapter":"基础语法、数组与流程控制","title":"下列数据类型中，不能作为 switch 表达式类型的是（　）。","titleHtml":"下列数据类型中，不能作为 switch 表达式类型的是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"int","html":"<p><code>int</code></p>"},{"key":"B","text":"char","html":"<p><code>char</code></p>"},{"key":"C","text":"double","html":"<p><code>double</code></p>"},{"key":"D","text":"String","html":"<p><code>String</code></p>"}],"answer":"C","answerText":"C double","explanation":"switch 支持整数相关类型、char、String、枚举等，但不支持 double。","explanationHtml":"<p><code>switch</code> 支持整数相关类型、<code>char</code>、<code>String</code>、枚举等，但不支持 <code>double</code>。</p>","important":false},{"id":"java-q26","number":26,"type":"choice","chapter":"基础语法、数组与流程控制","title":"下列代码的编译结果是（　）。","titleHtml":"下列代码的编译结果是（　）。","stem":"byte b = 10;\nb = b + 1;","stemHtml":"<pre><code class=\"language-java\">byte b = 10;\nb = b + 1;</code></pre>","options":[{"key":"A","text":"编译成功，b 的值为 11","html":"<p>编译成功，b 的值为 11</p>"},{"key":"B","text":"编译错误，b + 1 的结果类型为 int，赋值给 byte 需要强制类型转换","html":"<p>编译错误，b + 1 的结果类型为 int，赋值给 byte 需要强制类型转换</p>"},{"key":"C","text":"编译成功，但运行时抛出异常","html":"<p>编译成功，但运行时抛出异常</p>"},{"key":"D","text":"编译成功，b 的值溢出为 0","html":"<p>编译成功，b 的值溢出为 0</p>"}],"answer":"B","answerText":"B 编译错误，b + 1 的结果类型为 int，赋值给 byte 需要强制类型转换","explanation":"表达式 b + 1 会发生整数提升，结果是 int，不能直接赋给 byte。","explanationHtml":"<p>表达式 <code>b + 1</code> 会发生整数提升，结果是 <code>int</code>，不能直接赋给 <code>byte</code>。</p>","important":false},{"id":"java-q27","number":27,"type":"choice","chapter":"基础语法、数组与流程控制","title":"下列语句的输出结果是（　）。","titleHtml":"下列语句的输出结果是（　）。","stem":"System.out.println(1 + 2 + \"3\");","stemHtml":"<pre><code class=\"language-java\">System.out.println(1 + 2 + &quot;3&quot;);</code></pre>","options":[{"key":"A","text":"33","html":"<p><code>33</code></p>"},{"key":"B","text":"123","html":"<p><code>123</code></p>"},{"key":"C","text":"6","html":"<p><code>6</code></p>"},{"key":"D","text":"编译错误","html":"<p>编译错误</p>"}],"answer":"A","answerText":"A 33","explanation":"先计算 1 + 2 得到 3，再与字符串 \"3\" 连接，输出 33。","explanationHtml":"<p>先计算 <code>1 + 2</code> 得到 <code>3</code>，再与字符串 <code>&quot;3&quot;</code> 连接，输出 <code>33</code>。</p>","important":false},{"id":"java-q28","number":28,"type":"choice","chapter":"基础语法、数组与流程控制","title":"执行 int[] a = new int[3]; 后，数组元素的值是（　）。","titleHtml":"执行 int[] a = new int[3]; 后，数组元素的值是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"null、null、null","html":"<p><code>null、null、null</code></p>"},{"key":"B","text":"1、2、3","html":"<p><code>1、2、3</code></p>"},{"key":"C","text":"0、0、0","html":"<p><code>0、0、0</code></p>"},{"key":"D","text":"随机值","html":"<p>随机值</p>"}],"answer":"C","answerText":"C 0、0、0","explanation":"新创建的 int 数组元素具有默认值 0，而不是未初始化的随机值。","explanationHtml":"<p>新创建的 <code>int</code> 数组元素具有默认值 <code>0</code>，而不是未初始化的随机值。</p>","important":false},{"id":"java-q29","number":29,"type":"choice","chapter":"基础语法、数组与流程控制","title":"执行 int[][] a = new int[2][3]; 后，表达式 a.length + a[0].length 的值是（　）。","titleHtml":"执行 int[][] a = new int[2][3]; 后，表达式 a.length + a[0].length 的值是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"5","html":"<p><code>5</code></p>"},{"key":"B","text":"6","html":"<p><code>6</code></p>"},{"key":"C","text":"2","html":"<p><code>2</code></p>"},{"key":"D","text":"3","html":"<p><code>3</code></p>"}],"answer":"A","answerText":"A 5","explanation":"外层数组长度为 2，首个内层数组长度为 3，因此结果为 5。","explanationHtml":"<p>外层数组长度为 <code>2</code>，首个内层数组长度为 <code>3</code>，因此结果为 <code>5</code>。</p>","important":false},{"id":"java-q30","number":30,"type":"choice","chapter":"基础语法、数组与流程控制","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"int x = 2;\nswitch (x) {\n    case 1: System.out.print(\"A\");\n    case 2: System.out.print(\"B\");\n    case 3: System.out.print(\"C\"); break;\n    default: System.out.print(\"D\");\n}","stemHtml":"<pre><code class=\"language-java\">int x = 2;\nswitch (x) {\n    case 1: System.out.print(&quot;A&quot;);\n    case 2: System.out.print(&quot;B&quot;);\n    case 3: System.out.print(&quot;C&quot;); break;\n    default: System.out.print(&quot;D&quot;);\n}</code></pre>","options":[{"key":"A","text":"AB","html":"<p><code>AB</code></p>"},{"key":"B","text":"BC","html":"<p><code>BC</code></p>"},{"key":"C","text":"BCD","html":"<p><code>BCD</code></p>"},{"key":"D","text":"C","html":"<p><code>C</code></p>"}],"answer":"B","answerText":"B BC","explanation":"匹配 case 2 后输出 B，由于没有 break 继续执行 case 3 输出 C，随后退出。","explanationHtml":"<p>匹配 <code>case 2</code> 后输出 <code>B</code>，由于没有 <code>break</code> 继续执行 <code>case 3</code> 输出 <code>C</code>，随后退出。</p>","important":false},{"id":"java-q31","number":31,"type":"choice","chapter":"基础语法、数组与流程控制","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"int i = 0;\nwhile (i < 5) {\n    i += 2;\n}\nSystem.out.println(i);","stemHtml":"<pre><code class=\"language-java\">int i = 0;\nwhile (i &lt; 5) {\n    i += 2;\n}\nSystem.out.println(i);</code></pre>","options":[{"key":"A","text":"6","html":"<p><code>6</code></p>"},{"key":"B","text":"4","html":"<p><code>4</code></p>"},{"key":"C","text":"5","html":"<p><code>5</code></p>"},{"key":"D","text":"0","html":"<p><code>0</code></p>"}],"answer":"A","answerText":"A 6","explanation":"i 依次变为 2、4、6，达到 6 后循环条件为假。","explanationHtml":"<p><code>i</code> 依次变为 <code>2、4、6</code>，达到 <code>6</code> 后循环条件为假。</p>","important":false},{"id":"java-q32","number":32,"type":"choice","chapter":"基础语法、数组与流程控制","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"int i = 5;\ndo {\n    System.out.print(i);\n    i++;\n} while (i < 3);","stemHtml":"<pre><code class=\"language-java\">int i = 5;\ndo {\n    System.out.print(i);\n    i++;\n} while (i &lt; 3);</code></pre>","options":[{"key":"A","text":"不输出任何内容","html":"<p>不输出任何内容</p>"},{"key":"B","text":"56","html":"<p><code>56</code></p>"},{"key":"C","text":"5","html":"<p><code>5</code></p>"},{"key":"D","text":"无限循环","html":"<p>无限循环</p>"}],"answer":"C","answerText":"C 5","explanation":"do-while 先执行循环体，再检查条件，所以即使初始条件不成立也会输出一次 5。","explanationHtml":"<p><code>do-while</code> 先执行循环体，再检查条件，所以即使初始条件不成立也会输出一次 <code>5</code>。</p>","important":false},{"id":"java-q33","number":33,"type":"choice","chapter":"基础语法、数组与流程控制","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"for (int i = 1; i <= 5; i++) {\n    if (i % 2 == 0) continue;\n    System.out.print(i);\n}","stemHtml":"<pre><code class=\"language-java\">for (int i = 1; i &lt;= 5; i++) {\n    if (i % 2 == 0) continue;\n    System.out.print(i);\n}</code></pre>","options":[{"key":"A","text":"12345","html":"<p><code>12345</code></p>"},{"key":"B","text":"24","html":"<p><code>24</code></p>"},{"key":"C","text":"135","html":"<p><code>135</code></p>"},{"key":"D","text":"1234","html":"<p><code>1234</code></p>"}],"answer":"C","answerText":"C 135","explanation":"continue 跳过偶数对应的打印操作，因此仅输出 1、3、5。","explanationHtml":"<p><code>continue</code> 跳过偶数对应的打印操作，因此仅输出 <code>1、3、5</code>。</p>","important":false},{"id":"java-q34","number":34,"type":"choice","chapter":"基础语法、数组与流程控制","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"for (int i = 1; i <= 5; i++) {\n    if (i == 3) break;\n    System.out.print(i);\n}","stemHtml":"<pre><code class=\"language-java\">for (int i = 1; i &lt;= 5; i++) {\n    if (i == 3) break;\n    System.out.print(i);\n}</code></pre>","options":[{"key":"A","text":"123","html":"<p><code>123</code></p>"},{"key":"B","text":"1245","html":"<p><code>1245</code></p>"},{"key":"C","text":"3","html":"<p><code>3</code></p>"},{"key":"D","text":"12","html":"<p><code>12</code></p>"}],"answer":"D","answerText":"D 12","explanation":"当 i == 3 时先执行 break，因此只输出 1、2。","explanationHtml":"<p>当 <code>i == 3</code> 时先执行 <code>break</code>，因此只输出 <code>1、2</code>。</p>","important":false},{"id":"java-q35","number":35,"type":"choice","chapter":"基础语法、数组与流程控制","title":"下列代码执行后，y 的值是（　）。","titleHtml":"下列代码执行后，y 的值是（　）。","stem":"int x = 5;\nint y = 2 + 3  4 > 10 && 5 != 5 ? 1 : 0;","stemHtml":"<pre><code class=\"language-java\">int x = 5;\nint y = 2 + 3 * 4 &gt; 10 &amp;&amp; 5 != 5 ? 1 : 0;</code></pre>","options":[{"key":"A","text":"1","html":"<p><code>1</code></p>"},{"key":"B","text":"14","html":"<p><code>14</code></p>"},{"key":"C","text":"编译错误","html":"<p>编译错误</p>"},{"key":"D","text":"0","html":"<p><code>0</code></p>"}],"answer":"D","answerText":"D 0","explanation":"2 + 3  4 > 10 为真，但 5 != 5 为假，&& 得到假，三元表达式取 0。","explanationHtml":"<p><code>2 + 3 * 4 &gt; 10</code> 为真，但 <code>5 != 5</code> 为假，<code>&amp;&amp;</code> 得到假，三元表达式取 <code>0</code>。</p>","important":false},{"id":"java-q36","number":36,"type":"choice","chapter":"基础语法、数组与流程控制","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"int[] a = {1, 2, 3};\nint[] b = a;\nb[0] = 9;\nSystem.out.println(a[0]);","stemHtml":"<pre><code class=\"language-java\">int[] a = {1, 2, 3};\nint[] b = a;\nb[0] = 9;\nSystem.out.println(a[0]);</code></pre>","options":[{"key":"A","text":"1","html":"<p><code>1</code></p>"},{"key":"B","text":"9","html":"<p><code>9</code></p>"},{"key":"C","text":"3","html":"<p><code>3</code></p>"},{"key":"D","text":"编译错误","html":"<p>编译错误</p>"}],"answer":"B","answerText":"B 9","explanation":"a 与 b 指向同一个数组，修改 b[0] 会影响 a[0]。","explanationHtml":"<p><code>a</code> 与 <code>b</code> 指向同一个数组，修改 <code>b[0]</code> 会影响 <code>a[0]</code>。</p>","important":false},{"id":"java-q37","number":37,"type":"choice","chapter":"基础语法、数组与流程控制","title":"执行下列代码，用户依次输入 18、回车、Tom、回车后，输出结果是（　）。","titleHtml":"执行下列代码，用户依次输入 18、回车、Tom、回车后，输出结果是（　）。","stem":"Scanner sc = new Scanner(System.in);\nint age = sc.nextInt();\nString name = sc.nextLine();\nSystem.out.println(name.length());","stemHtml":"<pre><code class=\"language-java\">Scanner sc = new Scanner(System.in);\nint age = sc.nextInt();\nString name = sc.nextLine();\nSystem.out.println(name.length());</code></pre>","options":[{"key":"A","text":"3","html":"<p><code>3</code></p>"},{"key":"B","text":"0","html":"<p><code>0</code></p>"},{"key":"C","text":"18","html":"<p><code>18</code></p>"},{"key":"D","text":"运行时抛出异常","html":"<p>运行时抛出异常</p>"}],"answer":"B","answerText":"B 0","explanation":"nextInt() 读取 18 后没有消费行末换行符，紧接着的 nextLine() 读取空行，长度为 0。","explanationHtml":"<p><code>nextInt()</code> 读取 <code>18</code> 后没有消费行末换行符，紧接着的 <code>nextLine()</code> 读取空行，长度为 <code>0</code>。</p>","important":false},{"id":"java-q38","number":38,"type":"choice","chapter":"基础语法、数组与流程控制","title":"下列语句的输出结果是（　）。","titleHtml":"下列语句的输出结果是（　）。","stem":"System.out.println('A' + 1);","stemHtml":"<pre><code class=\"language-java\">System.out.println(&#39;A&#39; + 1);</code></pre>","options":[{"key":"A","text":"B","html":"<p><code>B</code></p>"},{"key":"B","text":"65","html":"<p><code>65</code></p>"},{"key":"C","text":"66","html":"<p><code>66</code></p>"},{"key":"D","text":"编译错误","html":"<p>编译错误</p>"}],"answer":"C","answerText":"C 66","explanation":"char 与整数进行算术运算时转换为数值，字符 A 的编码值是 65，加 1 为 66。","explanationHtml":"<p><code>char</code> 与整数进行算术运算时转换为数值，字符 <code>A</code> 的编码值是 <code>65</code>，加 <code>1</code> 为 <code>66</code>。</p>","important":false},{"id":"java-q39","number":39,"type":"choice","chapter":"基础语法、数组与流程控制","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"int i = 0;\nboolean flag = (i++ > 0) && (++i > 0);\nSystem.out.println(i + \",\" + flag);","stemHtml":"<pre><code class=\"language-java\">int i = 0;\nboolean flag = (i++ &gt; 0) &amp;&amp; (++i &gt; 0);\nSystem.out.println(i + &quot;,&quot; + flag);</code></pre>","options":[{"key":"A","text":"0,false","html":"<p><code>0,false</code></p>"},{"key":"B","text":"2,false","html":"<p><code>2,false</code></p>"},{"key":"C","text":"2,true","html":"<p><code>2,true</code></p>"},{"key":"D","text":"1,false","html":"<p><code>1,false</code></p>"}],"answer":"D","answerText":"D 1,false","explanation":"i++ > 0 用旧值 0 比较，结果为假，但 i 变为 1；&& 短路，右侧不执行。","explanationHtml":"<p><code>i++ &gt; 0</code> 用旧值 <code>0</code> 比较，结果为假，但 <code>i</code> 变为 <code>1</code>；<code>&amp;&amp;</code> 短路，右侧不执行。</p>","important":false},{"id":"java-q40","number":40,"type":"choice","chapter":"基础语法、数组与流程控制","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"outer:\nfor (int i = 1; i <= 3; i++) {\n    for (int j = 1; j <= 3; j++) {\n        if (i  j > 4) break outer;\n        System.out.print(i  j + \" \");\n    }\n}","stemHtml":"<pre><code class=\"language-java\">outer:\nfor (int i = 1; i &lt;= 3; i++) {\n    for (int j = 1; j &lt;= 3; j++) {\n        if (i * j &gt; 4) break outer;\n        System.out.print(i * j + &quot; &quot;);\n    }\n}</code></pre>","options":[{"key":"A","text":"1 2 3 2 4 6","html":"<p><code>1 2 3 2 4 6</code></p>"},{"key":"B","text":"1 2 3 2 4","html":"<p><code>1 2 3 2 4</code></p>"},{"key":"C","text":"1 2 3 4","html":"<p><code>1 2 3 4</code></p>"},{"key":"D","text":"1 2 3 2 4 6 9","html":"<p><code>1 2 3 2 4 6 9</code></p>"}],"answer":"B","answerText":"B 1 2 3 2 4","explanation":"依次输出 1 2 3 2 4，遇到 2 × 3 > 4 时执行 break outer，直接退出两层循环。","explanationHtml":"<p>依次输出 <code>1 2 3 2 4</code>，遇到 <code>2 × 3 &gt; 4</code> 时执行 <code>break outer</code>，直接退出两层循环。</p>","important":false},{"id":"java-q41","number":41,"type":"choice","chapter":"类、对象、方法与访问权限","title":"在 Java 中，用于定义类的关键字是（　）。","titleHtml":"在 Java 中，用于定义类的关键字是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"class","html":"<p><code>class</code></p>"},{"key":"B","text":"Class","html":"<p><code>Class</code></p>"},{"key":"C","text":"struct","html":"<p><code>struct</code></p>"},{"key":"D","text":"interface","html":"<p><code>interface</code></p>"}],"answer":"A","answerText":"A class","explanation":"类声明使用小写关键字 class，Java 区分大小写。","explanationHtml":"<p>类声明使用小写关键字 <code>class</code>，Java 区分大小写。</p>","important":false},{"id":"java-q42","number":42,"type":"choice","chapter":"类、对象、方法与访问权限","title":"已知类 Person 有无参构造方法，创建其对象的正确语句是（　）。","titleHtml":"已知类 Person 有无参构造方法，创建其对象的正确语句是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"Person p = new Person();","html":"<p><code>Person p = new Person();</code></p>"},{"key":"B","text":"Person p = Person();","html":"<p><code>Person p = Person();</code></p>"},{"key":"C","text":"new Person p;","html":"<p><code>new Person p;</code></p>"},{"key":"D","text":"Person p = new();","html":"<p><code>Person p = new();</code></p>"}],"answer":"A","answerText":"A Person p = new Person();","explanation":"new Person() 调用无参构造方法，生成 Person 对象，并可将引用赋给变量 p。","explanationHtml":"<p><code>new Person()</code> 调用无参构造方法，生成 <code>Person</code> 对象，并可将引用赋给变量 <code>p</code>。</p>","important":false},{"id":"java-q43","number":43,"type":"choice","chapter":"类、对象、方法与访问权限","title":"如果一个方法不需要返回任何值，其返回类型应声明为（　）。","titleHtml":"如果一个方法不需要返回任何值，其返回类型应声明为（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"null","html":"<p><code>null</code></p>"},{"key":"B","text":"void","html":"<p><code>void</code></p>"},{"key":"C","text":"int","html":"<p><code>int</code></p>"},{"key":"D","text":"empty","html":"<p><code>empty</code></p>"}],"answer":"B","answerText":"B void","explanation":"不返回结果的方法声明返回类型为 void。","explanationHtml":"<p>不返回结果的方法声明返回类型为 <code>void</code>。</p>","important":false},{"id":"java-q44","number":44,"type":"choice","chapter":"类、对象、方法与访问权限","title":"关于 return 语句的作用，下列说法正确的是（　）。","titleHtml":"关于 return 语句的作用，下列说法正确的是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"结束当前方法的执行，并将控制权返回调用处","html":"<p>结束当前方法的执行，并将控制权返回调用处</p>"},{"key":"B","text":"只能出现在 main 方法中","html":"<p>只能出现在 main 方法中</p>"},{"key":"C","text":"结束整个 Java 程序的运行","html":"<p>结束整个 Java 程序的运行</p>"},{"key":"D","text":"只能用于返回字符串","html":"<p>只能用于返回字符串</p>"}],"answer":"A","answerText":"A 结束当前方法的执行，并将控制权返回调用处","explanation":"return 立即结束当前方法并返回调用位置；它不必然终止整个程序。","explanationHtml":"<p><code>return</code> 立即结束当前方法并返回调用位置；它不必然终止整个程序。</p>","important":false},{"id":"java-q45","number":45,"type":"choice","chapter":"类、对象、方法与访问权限","title":"构造方法的名称必须（　）。","titleHtml":"构造方法的名称必须（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"与所在类的类名相同","html":"<p>与所在类的类名相同</p>"},{"key":"B","text":"与所在类的对象名相同","html":"<p>与所在类的对象名相同</p>"},{"key":"C","text":"固定为 init","html":"<p>固定为 init</p>"},{"key":"D","text":"与所在类的父类名相同","html":"<p>与所在类的父类名相同</p>"}],"answer":"A","answerText":"A 与所在类的类名相同","explanation":"构造方法必须与所在类同名，并且没有返回类型。","explanationHtml":"<p>构造方法必须与所在类同名，并且没有返回类型。</p>","important":false},{"id":"java-q46","number":46,"type":"choice","chapter":"类、对象、方法与访问权限","title":"如果一个类没有显式定义任何构造方法，则 Java 会（　）。","titleHtml":"如果一个类没有显式定义任何构造方法，则 Java 会（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"不提供任何构造方法，因此无法创建对象","html":"<p>不提供任何构造方法，因此无法创建对象</p>"},{"key":"B","text":"自动提供一个带一个 int 参数的构造方法","html":"<p>自动提供一个带一个 int 参数的构造方法</p>"},{"key":"C","text":"直接导致编译错误","html":"<p>直接导致编译错误</p>"},{"key":"D","text":"自动提供一个无参的默认构造方法","html":"<p>自动提供一个无参的默认构造方法</p>"}],"answer":"D","answerText":"D 自动提供一个无参的默认构造方法","explanation":"如果一个类未声明任何构造方法，编译器会提供默认无参构造方法。","explanationHtml":"<p>如果一个类未声明任何构造方法，编译器会提供默认无参构造方法。</p>","important":false},{"id":"java-q47","number":47,"type":"choice","chapter":"类、对象、方法与访问权限","title":"方法重载指的是（　）。","titleHtml":"方法重载指的是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"方法名不同而参数列表相同","html":"<p>方法名不同而参数列表相同</p>"},{"key":"B","text":"只有返回值类型不同","html":"<p>只有返回值类型不同</p>"},{"key":"C","text":"在同一个类中，方法名相同而参数列表不同","html":"<p>在同一个类中，方法名相同而参数列表不同</p>"},{"key":"D","text":"子类对父类方法重新实现","html":"<p>子类对父类方法重新实现</p>"}],"answer":"C","answerText":"C 在同一个类中，方法名相同而参数列表不同","explanation":"重载要求方法名相同、参数列表不同；仅更换返回类型不能构成重载。","explanationHtml":"<p>重载要求方法名相同、参数列表不同；仅更换返回类型不能构成重载。</p>","important":false},{"id":"java-q48","number":48,"type":"choice","chapter":"类、对象、方法与访问权限","title":"在 Java 源文件开头声明包 com.demo，正确的语句是（　）。","titleHtml":"在 Java 源文件开头声明包 com.demo，正确的语句是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"package com.demo;","html":"<p><code>package com.demo;</code></p>"},{"key":"B","text":"import com.demo;","html":"<p><code>import com.demo;</code></p>"},{"key":"C","text":"namespace com.demo;","html":"<p><code>namespace com.demo;</code></p>"},{"key":"D","text":"class com.demo;","html":"<p><code>class com.demo;</code></p>"}],"answer":"A","answerText":"A package com.demo;","explanation":"声明包使用 package，通常放在源文件的开头（注释除外）。","explanationHtml":"<p>声明包使用 <code>package</code>，通常放在源文件的开头（注释除外）。</p>","important":false},{"id":"java-q49","number":49,"type":"choice","chapter":"类、对象、方法与访问权限","title":"要使用 java.util 包中的 Scanner 类，正确的导入语句是（　）。","titleHtml":"要使用 java.util 包中的 Scanner 类，正确的导入语句是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"package java.util.Scanner;","html":"<p><code>package java.util.Scanner;</code></p>"},{"key":"B","text":"import java.util.Scanner;","html":"<p><code>import java.util.Scanner;</code></p>"},{"key":"C","text":"using java.util.Scanner;","html":"<p><code>using java.util.Scanner;</code></p>"},{"key":"D","text":"include java.util.Scanner;","html":"<p><code>include java.util.Scanner;</code></p>"}],"answer":"B","answerText":"B import java.util.Scanner;","explanation":"Scanner 的完整类名是 java.util.Scanner，通过 import 导入。","explanationHtml":"<p><code>Scanner</code> 的完整类名是 <code>java.util.Scanner</code>，通过 <code>import</code> 导入。</p>","important":false},{"id":"java-q50","number":50,"type":"choice","chapter":"类、对象、方法与访问权限","title":"下列访问控制修饰符中，访问范围最小的是（　）。","titleHtml":"下列访问控制修饰符中，访问范围最小的是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"public","html":"<p><code>public</code></p>"},{"key":"B","text":"protected","html":"<p><code>protected</code></p>"},{"key":"C","text":"private","html":"<p><code>private</code></p>"},{"key":"D","text":"默认(不写修饰符)","html":"<p>默认(不写修饰符)</p>"}],"answer":"C","answerText":"C private","explanation":"private 将成员访问限制在声明类的访问范围内，通常比包访问、protected 和 public 更严格。","explanationHtml":"<p><code>private</code> 将成员访问限制在声明类的访问范围内，通常比包访问、<code>protected</code> 和 <code>public</code> 更严格。</p>","important":false},{"id":"java-q51","number":51,"type":"choice","chapter":"类、对象、方法与访问权限","title":"已知 Person 类中定义了静态方法 getName()，推荐的调用方式是（　）。","titleHtml":"已知 Person 类中定义了静态方法 getName()，推荐的调用方式是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"new Person().getName()","html":"<p><code>new Person().getName()</code></p>"},{"key":"B","text":"Person->getName()","html":"<p><code>Person-&gt;getName()</code></p>"},{"key":"C","text":"getName()","html":"<p><code>getName()</code></p>"},{"key":"D","text":"Person.getName()","html":"<p><code>Person.getName()</code></p>"}],"answer":"D","answerText":"D Person.getName()","explanation":"静态成员归类所有，应优先使用 Person.getName() 的“类名.方法名”形式调用。","explanationHtml":"<p>静态成员归类所有，应优先使用 <code>Person.getName()</code> 的“类名.方法名”形式调用。</p>","important":false},{"id":"java-q52","number":52,"type":"choice","chapter":"类、对象、方法与访问权限","title":"用 static 修饰的成员变量，其特点是（　）。","titleHtml":"用 static 修饰的成员变量，其特点是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"每个对象各有一份副本","html":"<p>每个对象各有一份副本</p>"},{"key":"B","text":"被该类的所有对象共享","html":"<p>被该类的所有对象共享</p>"},{"key":"C","text":"只能在构造方法中访问","html":"<p>只能在构造方法中访问</p>"},{"key":"D","text":"必须同时用 final 修饰","html":"<p>必须同时用 final 修饰</p>"}],"answer":"B","answerText":"B 被该类的所有对象共享","explanation":"static 字段属于类；对象不是各自维护独立的字段副本。","explanationHtml":"<p><code>static</code> 字段属于类；对象不是各自维护独立的字段副本。</p>","important":false},{"id":"java-q53","number":53,"type":"choice","chapter":"类、对象、方法与访问权限","title":"在方法内部定义的局部变量，其作用范围一般是（　）。","titleHtml":"在方法内部定义的局部变量，其作用范围一般是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"从声明处开始，到所在方法或代码块结束","html":"<p>从声明处开始，到所在方法或代码块结束</p>"},{"key":"B","text":"整个 Java 程序","html":"<p>整个 Java 程序</p>"},{"key":"C","text":"该类的所有对象","html":"<p>该类的所有对象</p>"},{"key":"D","text":"父类和子类","html":"<p>父类和子类</p>"}],"answer":"A","answerText":"A 从声明处开始，到所在方法或代码块结束","explanation":"局部变量一般从声明位置开始，在所属作用域结束时不再可见。","explanationHtml":"<p>局部变量一般从声明位置开始，在所属作用域结束时不再可见。</p>","important":false},{"id":"java-q54","number":54,"type":"choice","chapter":"类、对象、方法与访问权限","title":"已知对象 p 有可访问的成员变量 name，访问该成员变量的正确写法是（　）。","titleHtml":"已知对象 p 有可访问的成员变量 name，访问该成员变量的正确写法是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"p->name","html":"<p><code>p-&gt;name</code></p>"},{"key":"B","text":"p::name","html":"<p><code>p::name</code></p>"},{"key":"C","text":"p[name]","html":"<p><code>p[name]</code></p>"},{"key":"D","text":"p.name","html":"<p><code>p.name</code></p>"}],"answer":"D","answerText":"D p.name","explanation":"Java 使用点号 . 访问对象的可访问成员。","explanationHtml":"<p>Java 使用点号 <code>.</code> 访问对象的可访问成员。</p>","important":false},{"id":"java-q55","number":55,"type":"choice","chapter":"类、对象、方法与访问权限","title":"static 代码块通常在什么时候执行（　）。","titleHtml":"static 代码块通常在什么时候执行（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"每次创建对象时执行","html":"<p>每次创建对象时执行</p>"},{"key":"B","text":"类加载时执行，并且只执行一次","html":"<p>类加载时执行，并且只执行一次</p>"},{"key":"C","text":"每次调用静态方法时执行","html":"<p>每次调用静态方法时执行</p>"},{"key":"D","text":"程序退出时执行","html":"<p>程序退出时执行</p>"}],"answer":"B","answerText":"B 类加载时执行，并且只执行一次","explanation":"静态初始化块随类初始化执行，正常情况下每个类加载器只执行一次；准确地说是“类初始化时”，而不只是装载字节码时。","explanationHtml":"<p>静态初始化块随类初始化执行，正常情况下每个类加载器只执行一次；准确地说是“类初始化时”，而不只是装载字节码时。</p>","important":false},{"id":"java-q56","number":56,"type":"choice","chapter":"类、对象、方法与访问权限","title":"下列哪一组方法构成了合法的重载（　）。","titleHtml":"下列哪一组方法构成了合法的重载（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"void print(int x) 与 void print(String s)","html":"<p>void print(int x) 与 void print(String s)</p>"},{"key":"B","text":"void print(int x) 与 int print(int x)","html":"<p>void print(int x) 与 int print(int x)</p>"},{"key":"C","text":"void print(int x) 与 void print(int y)","html":"<p>void print(int x) 与 void print(int y)</p>"},{"key":"D","text":"void print(int x) 与 static void print(int x)","html":"<p>void print(int x) 与 static void print(int x)</p>"}],"answer":"A","answerText":"A void print(int x) 与 void print(String s)","explanation":"print(int) 与 print(String) 方法名相同，但参数类型不同，构成合法重载。","explanationHtml":"<p><code>print(int)</code> 与 <code>print(String)</code> 方法名相同，但参数类型不同，构成合法重载。</p>","important":false},{"id":"java-q57","number":57,"type":"choice","chapter":"类、对象、方法与访问权限","title":"下列代码的编译结果是（　）。","titleHtml":"下列代码的编译结果是（　）。","stem":"class Test {\n    int x = 10;\n    static void show() {\n        System.out.println(x);\n    }\n}","stemHtml":"<pre><code class=\"language-java\">class Test {\n    int x = 10;\n    static void show() {\n        System.out.println(x);\n    }\n}</code></pre>","options":[{"key":"A","text":"输出 10","html":"<p>输出 10</p>"},{"key":"B","text":"输出 0","html":"<p>输出 0</p>"},{"key":"C","text":"编译错误，静态方法不能直接访问实例变量 x","html":"<p>编译错误，静态方法不能直接访问实例变量 x</p>"},{"key":"D","text":"运行时抛出 NullPointerException","html":"<p>运行时抛出 NullPointerException</p>"}],"answer":"C","answerText":"C 编译错误，静态方法不能直接访问实例变量 x","explanation":"实例字段 x 依附于对象；静态方法中没有 this，不能直接读取 x。","explanationHtml":"<p>实例字段 <code>x</code> 依附于对象；静态方法中没有 <code>this</code>，不能直接读取 <code>x</code>。</p>","important":false},{"id":"java-q58","number":58,"type":"choice","chapter":"类、对象、方法与访问权限","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"class Init {\n    static int a = 1;\n    static { a = 2; }\n    static { a += 3; }\n    public static void main(String[] args) {\n        System.out.println(a);\n    }\n}","stemHtml":"<pre><code class=\"language-java\">class Init {\n    static int a = 1;\n    static { a = 2; }\n    static { a += 3; }\n    public static void main(String[] args) {\n        System.out.println(a);\n    }\n}</code></pre>","options":[{"key":"A","text":"1","html":"<p><code>1</code></p>"},{"key":"B","text":"2","html":"<p><code>2</code></p>"},{"key":"C","text":"3","html":"<p><code>3</code></p>"},{"key":"D","text":"5","html":"<p><code>5</code></p>"}],"answer":"D","answerText":"D 5","explanation":"类初始化按代码顺序进行：a 先为 1，再赋为 2，最后增加 3 得到 5。","explanationHtml":"<p>类初始化按代码顺序进行：<code>a</code> 先为 <code>1</code>，再赋为 <code>2</code>，最后增加 <code>3</code> 得到 <code>5</code>。</p>","important":false},{"id":"java-q59","number":59,"type":"choice","chapter":"类、对象、方法与访问权限","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"class Demo {\n    static void change(int x) {\n        x = 100;\n    }\n    public static void main(String[] args) {\n        int a = 10;\n        change(a);\n        System.out.println(a);\n    }\n}","stemHtml":"<pre><code class=\"language-java\">class Demo {\n    static void change(int x) {\n        x = 100;\n    }\n    public static void main(String[] args) {\n        int a = 10;\n        change(a);\n        System.out.println(a);\n    }\n}</code></pre>","options":[{"key":"A","text":"100","html":"<p><code>100</code></p>"},{"key":"B","text":"10","html":"<p><code>10</code></p>"},{"key":"C","text":"0","html":"<p><code>0</code></p>"},{"key":"D","text":"编译错误","html":"<p>编译错误</p>"}],"answer":"B","answerText":"B 10","explanation":"Java 使用值传递，change 修改的只是形参 x，原变量 a 仍为 10。","explanationHtml":"<p>Java 使用值传递，<code>change</code> 修改的只是形参 <code>x</code>，原变量 <code>a</code> 仍为 <code>10</code>。</p>","important":false},{"id":"java-q60","number":60,"type":"choice","chapter":"类、对象、方法与访问权限","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"class Demo {\n    static void change(int[] arr) {\n        arr[0] = 100;\n    }\n    public static void main(String[] args) {\n        int[] a = {1, 2};\n        change(a);\n        System.out.println(a[0]);\n    }\n}","stemHtml":"<pre><code class=\"language-java\">class Demo {\n    static void change(int[] arr) {\n        arr[0] = 100;\n    }\n    public static void main(String[] args) {\n        int[] a = {1, 2};\n        change(a);\n        System.out.println(a[0]);\n    }\n}</code></pre>","options":[{"key":"A","text":"100","html":"<p><code>100</code></p>"},{"key":"B","text":"1","html":"<p><code>1</code></p>"},{"key":"C","text":"2","html":"<p><code>2</code></p>"},{"key":"D","text":"编译错误","html":"<p>编译错误</p>"}],"answer":"A","answerText":"A 100","explanation":"传入的是数组引用的副本，两个引用指向同一数组；修改数组元素会反映到调用者。","explanationHtml":"<p>传入的是数组引用的副本，两个引用指向同一数组；修改数组元素会反映到调用者。</p>","important":false},{"id":"java-q61","number":61,"type":"choice","chapter":"类、对象、方法与访问权限","title":"类 A 和类 B 位于同一个包中。类 A 中有一个不使用访问修饰符的成员变量 x，则类 B（　）。","titleHtml":"类 A 和类 B 位于同一个包中。类 A 中有一个不使用访问修饰符的成员变量 x，则类 B（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"不能访问 x，因为 x 是私有的","html":"<p>不能访问 x，因为 x 是私有的</p>"},{"key":"B","text":"只有在继承 A 后才能访问 x","html":"<p>只有在继承 A 后才能访问 x</p>"},{"key":"C","text":"必须通过反射才能访问 x","html":"<p>必须通过反射才能访问 x</p>"},{"key":"D","text":"可以直接访问 x","html":"<p>可以直接访问 x</p>"}],"answer":"D","answerText":"D 可以直接访问 x","explanation":"不写访问修饰符表示包级访问权限，同包中的其他类可以访问该成员（仍需适当的对象引用）。","explanationHtml":"<p>不写访问修饰符表示包级访问权限，同包中的其他类可以访问该成员（仍需适当的对象引用）。</p>","important":false},{"id":"java-q62","number":62,"type":"choice","chapter":"类、对象、方法与访问权限","title":"一个被 private 修饰的成员变量，可以被哪些类直接访问（　）。","titleHtml":"一个被 private 修饰的成员变量，可以被哪些类直接访问（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"同包中的所有类","html":"<p>同包中的所有类</p>"},{"key":"B","text":"该类的所有子类","html":"<p>该类的所有子类</p>"},{"key":"C","text":"只有声明该成员变量的类","html":"<p>只有声明该成员变量的类</p>"},{"key":"D","text":"任何类","html":"<p>任何类</p>"}],"answer":"C","answerText":"C 只有声明该成员变量的类","explanation":"本题考查 private 的一般限制：外部普通类不能直接访问该字段；嵌套类之间存在特殊访问规则。","explanationHtml":"<p>本题考查 <code>private</code> 的一般限制：外部普通类不能直接访问该字段；嵌套类之间存在特殊访问规则。</p>","important":false},{"id":"java-q63","number":63,"type":"choice","chapter":"类、对象、方法与访问权限","title":"下列方法定义中，编译会报错的是（　）。","titleHtml":"下列方法定义中，编译会报错的是（　）。","stem":"int sign(int x) {\n    if (x > 0) return 1;\n    else if (x < 0) return -1;\n}","stemHtml":"<pre><code class=\"language-java\">int sign(int x) {\n    if (x &gt; 0) return 1;\n    else if (x &lt; 0) return -1;\n}</code></pre>","options":[{"key":"A","text":"编译成功，x 等于 0 时自动返回 0","html":"<p>编译成功，x 等于 0 时自动返回 0</p>"},{"key":"B","text":"编译成功，x 等于 0 时返回 -1","html":"<p>编译成功，x 等于 0 时返回 -1</p>"},{"key":"C","text":"该代码编译错误，因为 x 等于 0 时没有返回值","html":"<p>该代码编译错误，因为 x 等于 0 时没有返回值</p>"},{"key":"D","text":"编译可以通过，只有运行时才可能出错","html":"<p>编译可以通过，只有运行时才可能出错</p>"}],"answer":"C","answerText":"C 该代码编译错误，因为 x 等于 0 时没有返回值","explanation":"当 x == 0 时两个分支都不返回值，而方法声明返回 int，故编译时会报“缺少返回语句”。","explanationHtml":"<p>当 <code>x == 0</code> 时两个分支都不返回值，而方法声明返回 <code>int</code>，故编译时会报“缺少返回语句”。</p>","important":true},{"id":"java-q64","number":64,"type":"choice","chapter":"类、对象、方法与访问权限","title":"执行下列代码后，输出结果是（　）。","titleHtml":"执行下列代码后，输出结果是（　）。","stem":"Person[] ps = new Person[3];\nSystem.out.println(ps[0]);","stemHtml":"<pre><code class=\"language-java\">Person[] ps = new Person[3];\nSystem.out.println(ps[0]);</code></pre>","options":[{"key":"A","text":"编译错误","html":"<p>编译错误</p>"},{"key":"B","text":"null","html":"<p><code>null</code></p>"},{"key":"C","text":"0","html":"<p><code>0</code></p>"},{"key":"D","text":"一个默认创建的 Person 对象","html":"<p>一个默认创建的 Person 对象</p>"}],"answer":"B","answerText":"B null","explanation":"new Person[3] 只创建保存引用的数组，不会自动实例化三个 Person 对象；各元素初值为 null。","explanationHtml":"<p><code>new Person[3]</code> 只创建保存引用的数组，不会自动实例化三个 <code>Person</code> 对象；各元素初值为 <code>null</code>。</p>","important":false},{"id":"java-q65","number":65,"type":"choice","chapter":"类、对象、方法与访问权限","title":"已知类 Data 的定义如下，执行 new Data() 后，成员变量默认值描述正确的是（　）。","titleHtml":"已知类 Data 的定义如下，执行 new Data() 后，成员变量默认值描述正确的是（　）。","stem":"class Data {\n    int x;\n    boolean flag;\n    String s;\n}","stemHtml":"<pre><code class=\"language-java\">class Data {\n    int x;\n    boolean flag;\n    String s;\n}</code></pre>","options":[{"key":"A","text":"x 为 0，flag 为 true，s 为空字符串","html":"<p>x 为 0，flag 为 true，s 为空字符串</p>"},{"key":"B","text":"x 为 0，flag 为 false，s 为 null","html":"<p>x 为 0，flag 为 false，s 为 null</p>"},{"key":"C","text":"x 为 1，flag 为 false，s 为 null","html":"<p>x 为 1，flag 为 false，s 为 null</p>"},{"key":"D","text":"三个变量都未初始化，无法访问","html":"<p>三个变量都未初始化，无法访问</p>"}],"answer":"B","answerText":"B x 为 0，flag 为 false，s 为 null","explanation":"实例字段的默认值分别为：int → 0，boolean → false，引用类型 String → null。","explanationHtml":"<p>实例字段的默认值分别为：<code>int</code> → <code>0</code>，<code>boolean</code> → <code>false</code>，引用类型 <code>String</code> → <code>null</code>。</p>","important":false},{"id":"java-q66","number":66,"type":"choice","chapter":"类、对象、方法与访问权限","title":"已知 class A { static void f() {} }，下列代码能编译并运行的是（　）。","titleHtml":"已知 class A { static void f() {} }，下列代码能编译并运行的是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"A a = new A(); a.f();","html":"<p><code>A a = new A(); a.f();</code></p>"},{"key":"B","text":"A.f;","html":"<p><code>A.f;</code></p>"},{"key":"C","text":"new A().f;","html":"<p><code>new A().f;</code></p>"},{"key":"D","text":"A->f();","html":"<p><code>A-&gt;f();</code></p>"}],"answer":"A","answerText":"A A a = new A(); a.f();","explanation":"Java 允许经由对象引用调用可访问的静态方法，因此 A 能运行；规范写法是 A.f()。","explanationHtml":"<p>Java 允许经由对象引用调用可访问的静态方法，因此 A 能运行；规范写法是 <code>A.f()</code>。</p>","important":false},{"id":"java-q67","number":67,"type":"choice","chapter":"类、对象、方法与访问权限","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"class A {\n    static int x = 1;\n    void show() {\n        System.out.println(x);\n    }\n    public static void main(String[] args) {\n        new A().show();\n    }\n}","stemHtml":"<pre><code class=\"language-java\">class A {\n    static int x = 1;\n    void show() {\n        System.out.println(x);\n    }\n    public static void main(String[] args) {\n        new A().show();\n    }\n}</code></pre>","options":[{"key":"A","text":"0","html":"<p><code>0</code></p>"},{"key":"B","text":"编译错误，实例方法不能访问静态变量","html":"<p>编译错误，实例方法不能访问静态变量</p>"},{"key":"C","text":"1","html":"<p><code>1</code></p>"},{"key":"D","text":"运行时异常","html":"<p>运行时异常</p>"}],"answer":"C","answerText":"C 1","explanation":"实例方法可以访问类的静态变量，因此 show() 输出 1。","explanationHtml":"<p>实例方法可以访问类的静态变量，因此 <code>show()</code> 输出 <code>1</code>。</p>","important":false},{"id":"java-q68","number":68,"type":"choice","chapter":"类、对象、方法与访问权限","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"class Init {\n    static int a = 10;\n    static { a = 20; }\n    static int b = a + 5;\n    static { b++; }\n    public static void main(String[] args) {\n        System.out.println(a + \",\" + b);\n    }\n}","stemHtml":"<pre><code class=\"language-java\">class Init {\n    static int a = 10;\n    static { a = 20; }\n    static int b = a + 5;\n    static { b++; }\n    public static void main(String[] args) {\n        System.out.println(a + &quot;,&quot; + b);\n    }\n}</code></pre>","options":[{"key":"A","text":"20,25","html":"<p><code>20,25</code></p>"},{"key":"B","text":"10,15","html":"<p><code>10,15</code></p>"},{"key":"C","text":"20,26","html":"<p><code>20,26</code></p>"},{"key":"D","text":"10,16","html":"<p><code>10,16</code></p>"}],"answer":"C","answerText":"C 20,26","explanation":"先得 a = 20，接着计算 b = a + 5 = 25，最后静态块执行 b++，所以输出 20,26。","explanationHtml":"<p>先得 <code>a = 20</code>，接着计算 <code>b = a + 5 = 25</code>，最后静态块执行 <code>b++</code>，所以输出 <code>20,26</code>。</p>","important":false},{"id":"java-q69","number":69,"type":"choice","chapter":"类、对象、方法与访问权限","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"class Demo {\n    void f(Object o) { System.out.print(\"Object\"); }\n    void f(String s) { System.out.print(\"String\"); }\n    public static void main(String[] args) {\n        new Demo().f(null);\n    }\n}","stemHtml":"<pre><code class=\"language-java\">class Demo {\n    void f(Object o) { System.out.print(&quot;Object&quot;); }\n    void f(String s) { System.out.print(&quot;String&quot;); }\n    public static void main(String[] args) {\n        new Demo().f(null);\n    }\n}</code></pre>","options":[{"key":"A","text":"Object","html":"<p><code>Object</code></p>"},{"key":"B","text":"编译错误，调用存在歧义","html":"<p>编译错误，调用存在歧义</p>"},{"key":"C","text":"运行时抛出 NullPointerException","html":"<p>运行时抛出 NullPointerException</p>"},{"key":"D","text":"String","html":"<p><code>String</code></p>"}],"answer":"D","answerText":"D String","explanation":"实参 null 同时匹配 Object 和 String，编译器优先选择参数类型更具体的 f(String)。","explanationHtml":"<p>实参 <code>null</code> 同时匹配 <code>Object</code> 和 <code>String</code>，编译器优先选择参数类型更具体的 <code>f(String)</code>。</p>","important":false},{"id":"java-q70","number":70,"type":"choice","chapter":"类、对象、方法与访问权限","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"class Box {\n    int v;\n    Box(int value) { v = value; }\n}\nclass Demo {\n    static void change(Box b) {\n        b = new Box(99);\n    }\n    public static void main(String[] args) {\n        Box b = new Box(1);\n        change(b);\n        System.out.println(b.v);\n    }\n}","stemHtml":"<pre><code class=\"language-java\">class Box {\n    int v;\n    Box(int value) { v = value; }\n}\nclass Demo {\n    static void change(Box b) {\n        b = new Box(99);\n    }\n    public static void main(String[] args) {\n        Box b = new Box(1);\n        change(b);\n        System.out.println(b.v);\n    }\n}</code></pre>","options":[{"key":"A","text":"99","html":"<p><code>99</code></p>"},{"key":"B","text":"0","html":"<p><code>0</code></p>"},{"key":"C","text":"1","html":"<p><code>1</code></p>"},{"key":"D","text":"编译错误","html":"<p>编译错误</p>"}],"answer":"C","answerText":"C 1","explanation":"change 中只是让形参 b 指向新对象，调用者的变量仍指向 Box(1)，所以输出 1。","explanationHtml":"<p><code>change</code> 中只是让形参 <code>b</code> 指向新对象，调用者的变量仍指向 <code>Box(1)</code>，所以输出 <code>1</code>。</p>","important":false},{"id":"java-q71","number":71,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"在 Java 中，实现类继承的关键字是（　）。","titleHtml":"在 Java 中，实现类继承的关键字是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"extends","html":"<p><code>extends</code></p>"},{"key":"B","text":"implements","html":"<p><code>implements</code></p>"},{"key":"C","text":"import","html":"<p><code>import</code></p>"},{"key":"D","text":"super","html":"<p><code>super</code></p>"}],"answer":"A","answerText":"A extends","explanation":"Java 中类继承类使用 extends；实现接口用 implements。","explanationHtml":"<p>Java 中类继承类使用 <code>extends</code>；实现接口用 <code>implements</code>。</p>","important":false},{"id":"java-q72","number":72,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"子类对父类中 private 修饰的成员变量（　）。","titleHtml":"子类对父类中 private 修饰的成员变量（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"不能直接访问，但父类提供的公共访问方法可以间接操作它","html":"<p>不能直接访问，但父类提供的公共访问方法可以间接操作它</p>"},{"key":"B","text":"可以直接访问","html":"<p>可以直接访问</p>"},{"key":"C","text":"只能通过 super 直接访问","html":"<p>只能通过 super 直接访问</p>"},{"key":"D","text":"会自动变为 protected","html":"<p>会自动变为 protected</p>"}],"answer":"A","answerText":"A 不能直接访问，但父类提供的公共访问方法可以间接操作它","explanation":"父类的 private 字段无法在子类代码中直接访问，但可借助父类公开的访问方法间接使用。","explanationHtml":"<p>父类的 <code>private</code> 字段无法在子类代码中直接访问，但可借助父类公开的访问方法间接使用。</p>","important":false},{"id":"java-q73","number":73,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"下列关于方法重写的说法，正确的是（　）。","titleHtml":"下列关于方法重写的说法，正确的是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"方法名相同即可，参数列表可以不同","html":"<p>方法名相同即可，参数列表可以不同</p>"},{"key":"B","text":"方法名和参数列表相同，返回类型相同或是父类方法返回类型的子类型","html":"<p>方法名和参数列表相同，返回类型相同或是父类方法返回类型的子类型</p>"},{"key":"C","text":"返回值类型必须与父类方法完全相同","html":"<p>返回值类型必须与父类方法完全相同</p>"},{"key":"D","text":"重写方法必须使用 static 修饰","html":"<p>重写方法必须使用 static 修饰</p>"}],"answer":"B","answerText":"B 方法名和参数列表相同，返回类型相同或是父类方法返回类型的子类型","explanation":"重写通常要求相同方法名和参数列表；引用类型的返回值可以采用协变返回类型，另有访问权限等限制。","explanationHtml":"<p>重写通常要求相同方法名和参数列表；引用类型的返回值可以采用协变返回类型，另有访问权限等限制。</p>","important":false},{"id":"java-q74","number":74,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"在子类构造方法中，使用 super(参数) 的作用是（　）。","titleHtml":"在子类构造方法中，使用 super(参数) 的作用是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"调用当前类的其他构造方法","html":"<p>调用当前类的其他构造方法</p>"},{"key":"B","text":"创建父类的一个独立对象","html":"<p>创建父类的一个独立对象</p>"},{"key":"C","text":"调用父类对应的构造方法","html":"<p>调用父类对应的构造方法</p>"},{"key":"D","text":"调用父类的静态方法","html":"<p>调用父类的静态方法</p>"}],"answer":"C","answerText":"C 调用父类对应的构造方法","explanation":"super(参数) 在子类构造过程调用匹配的父类构造方法。","explanationHtml":"<p><code>super(参数)</code> 在子类构造过程调用匹配的父类构造方法。</p>","important":false},{"id":"java-q75","number":75,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"在实例方法中，this 关键字表示（　）。","titleHtml":"在实例方法中，this 关键字表示（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"当前类的父类对象","html":"<p>当前类的父类对象</p>"},{"key":"B","text":"当前类的 Class 对象","html":"<p>当前类的 Class 对象</p>"},{"key":"C","text":"任意一个子类对象","html":"<p>任意一个子类对象</p>"},{"key":"D","text":"当前对象","html":"<p>当前对象</p>"}],"answer":"D","answerText":"D 当前对象","explanation":"实例方法中的 this 指向当前正在调用该方法的对象。","explanationHtml":"<p>实例方法中的 <code>this</code> 指向当前正在调用该方法的对象。</p>","important":false},{"id":"java-q76","number":76,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"已知 Dog 继承 Animal，下列赋值语句中能实现向上转型的是（　）。","titleHtml":"已知 Dog 继承 Animal，下列赋值语句中能实现向上转型的是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"Animal a = new Animal();","html":"<p><code>Animal a = new Animal();</code></p>"},{"key":"B","text":"Dog d = new Animal();","html":"<p><code>Dog d = new Animal();</code></p>"},{"key":"C","text":"Animal a = new Dog();","html":"<p><code>Animal a = new Dog();</code></p>"},{"key":"D","text":"Dog d = (Dog) new Animal();","html":"<p><code>Dog d = (Dog) new Animal();</code></p>"}],"answer":"C","answerText":"C Animal a = new Dog();","explanation":"子类对象可以自动转换为父类引用，Animal a = new Dog() 就是向上转型。","explanationHtml":"<p>子类对象可以自动转换为父类引用，<code>Animal a = new Dog()</code> 就是向上转型。</p>","important":false},{"id":"java-q77","number":77,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"将父类引用转换为子类类型时，通常需要（　）。","titleHtml":"将父类引用转换为子类类型时，通常需要（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"直接赋值，无需任何转换","html":"<p>直接赋值，无需任何转换</p>"},{"key":"B","text":"进行强制类型转换，并确保对象实际是子类类型","html":"<p>进行强制类型转换，并确保对象实际是子类类型</p>"},{"key":"C","text":"调用 super 方法","html":"<p>调用 super 方法</p>"},{"key":"D","text":"把父类声明为 abstract","html":"<p>把父类声明为 abstract</p>"}],"answer":"B","answerText":"B 进行强制类型转换，并确保对象实际是子类类型","explanation":"向下转型通常需强制类型转换，运行时对象还必须与目标子类类型兼容。","explanationHtml":"<p>向下转型通常需强制类型转换，运行时对象还必须与目标子类类型兼容。</p>","important":false},{"id":"java-q78","number":78,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"关于抽象类，下列说法正确的是（　）。","titleHtml":"关于抽象类，下列说法正确的是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"抽象类只能用 final 修饰","html":"<p>抽象类只能用 final 修饰</p>"},{"key":"B","text":"抽象类中不能有构造方法","html":"<p>抽象类中不能有构造方法</p>"},{"key":"C","text":"抽象类中所有方法都必须是抽象方法","html":"<p>抽象类中所有方法都必须是抽象方法</p>"},{"key":"D","text":"抽象类不能直接实例化，但可以声明引用变量","html":"<p>抽象类不能直接实例化，但可以声明引用变量</p>"}],"answer":"D","answerText":"D 抽象类不能直接实例化，但可以声明引用变量","explanation":"抽象类可以声明变量、包含普通方法和构造方法，但不能直接 new 一个抽象类对象。","explanationHtml":"<p>抽象类可以声明变量、包含普通方法和构造方法，但不能直接 <code>new</code> 一个抽象类对象。</p>","important":false},{"id":"java-q79","number":79,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"抽象方法的特点是（　）。","titleHtml":"抽象方法的特点是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"必须有方法体，但方法体为空","html":"<p>必须有方法体，但方法体为空</p>"},{"key":"B","text":"只能定义在接口中","html":"<p>只能定义在接口中</p>"},{"key":"C","text":"必须用 static 修饰","html":"<p>必须用 static 修饰</p>"},{"key":"D","text":"只有方法声明，没有方法体，以分号结束","html":"<p>只有方法声明，没有方法体，以分号结束</p>"}],"answer":"D","answerText":"D 只有方法声明，没有方法体，以分号结束","explanation":"抽象方法只有声明、没有实现体，以分号结尾，通常由非抽象子类实现。","explanationHtml":"<p>抽象方法只有声明、没有实现体，以分号结尾，通常由非抽象子类实现。</p>","important":false},{"id":"java-q80","number":80,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"类实现接口使用的关键字是（　）。","titleHtml":"类实现接口使用的关键字是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"implements","html":"<p><code>implements</code></p>"},{"key":"B","text":"extends","html":"<p><code>extends</code></p>"},{"key":"C","text":"import","html":"<p><code>import</code></p>"},{"key":"D","text":"interface","html":"<p><code>interface</code></p>"}],"answer":"A","answerText":"A implements","explanation":"Java 类通过 implements 声明实现接口。","explanationHtml":"<p>Java 类通过 <code>implements</code> 声明实现接口。</p>","important":false},{"id":"java-q81","number":81,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"接口之间实现多继承的正确写法是（　）。","titleHtml":"接口之间实现多继承的正确写法是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"interface C extends A, B {}","html":"<p><code>interface C extends A, B {}</code></p>"},{"key":"B","text":"interface C implements A, B {}","html":"<p><code>interface C implements A, B {}</code></p>"},{"key":"C","text":"class C extends A, B {}","html":"<p><code>class C extends A, B {}</code></p>"},{"key":"D","text":"interface C import A, B {}","html":"<p><code>interface C import A, B {}</code></p>"}],"answer":"A","answerText":"A interface C extends A, B {}","explanation":"接口可以使用 extends A, B 同时继承多个接口。","explanationHtml":"<p>接口可以使用 <code>extends A, B</code> 同时继承多个接口。</p>","important":false},{"id":"java-q82","number":82,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"多态的核心表现是（　）。","titleHtml":"多态的核心表现是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"父类引用指向子类对象，调用被重写的方法时执行子类版本","html":"<p>父类引用指向子类对象，调用被重写的方法时执行子类版本</p>"},{"key":"B","text":"一个类只能有一个对象","html":"<p>一个类只能有一个对象</p>"},{"key":"C","text":"子类自动继承父类的 private 方法","html":"<p>子类自动继承父类的 private 方法</p>"},{"key":"D","text":"所有方法都必须在编译时确定版本","html":"<p>所有方法都必须在编译时确定版本</p>"}],"answer":"A","answerText":"A 父类引用指向子类对象，调用被重写的方法时执行子类版本","explanation":"多态下，父类引用指向子类对象时，对可重写实例方法的调用会动态分派到子类实现。","explanationHtml":"<p>多态下，父类引用指向子类对象时，对可重写实例方法的调用会动态分派到子类实现。</p>","important":false},{"id":"java-q83","number":83,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"instanceof 运算符的返回类型是（　）。","titleHtml":"instanceof 运算符的返回类型是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"int","html":"<p><code>int</code></p>"},{"key":"B","text":"Object","html":"<p><code>Object</code></p>"},{"key":"C","text":"void","html":"<p><code>void</code></p>"},{"key":"D","text":"boolean","html":"<p><code>boolean</code></p>"}],"answer":"D","answerText":"D boolean","explanation":"instanceof 用于判断对象是否属于兼容类型，结果为布尔值。","explanationHtml":"<p><code>instanceof</code> 用于判断对象是否属于兼容类型，结果为布尔值。</p>","important":false},{"id":"java-q84","number":84,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"下列 Lambda 表达式写法正确的是（　）。","titleHtml":"下列 Lambda 表达式写法正确的是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"(a, b) -> a + b","html":"<p><code>(a, b) -&gt; a + b</code></p>"},{"key":"B","text":"a, b -> a + b","html":"<p><code>a, b -&gt; a + b</code></p>"},{"key":"C","text":"(a, b) => a + b","html":"<p><code>(a, b) =&gt; a + b</code></p>"},{"key":"D","text":"lambda(a, b) { return a + b; }","html":"<p><code>lambda(a, b) { return a + b; }</code></p>"}],"answer":"A","answerText":"A (a, b) -> a + b","explanation":"多参数 Lambda 使用 (a, b) -> 表达式，参数列表必须带圆括号。","explanationHtml":"<p>多参数 Lambda 使用 <code>(a, b) -&gt; 表达式</code>，参数列表必须带圆括号。</p>","important":false},{"id":"java-q85","number":85,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"函数式接口是指（　）。","titleHtml":"函数式接口是指（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"只包含一个成员变量的接口","html":"<p>只包含一个成员变量的接口</p>"},{"key":"B","text":"所有方法都必须用 static 修饰的接口","html":"<p>所有方法都必须用 static 修饰的接口</p>"},{"key":"C","text":"只能被一个类实现的接口","html":"<p>只能被一个类实现的接口</p>"},{"key":"D","text":"只包含一个抽象方法的接口(可包含默认方法和静态方法)","html":"<p>只包含一个抽象方法的接口(可包含默认方法和静态方法)</p>"}],"answer":"D","answerText":"D 只包含一个抽象方法的接口(可包含默认方法和静态方法)","explanation":"函数式接口只有一个需要实现的抽象方法，还允许存在默认方法、静态方法等。","explanationHtml":"<p>函数式接口只有一个需要实现的抽象方法，还允许存在默认方法、静态方法等。</p>","important":false},{"id":"java-q86","number":86,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"class A {\n    A() { System.out.print(\"A\"); }\n}\nclass B extends A {\n    B() { System.out.print(\"B\"); }\n}\npublic class Demo {\n    public static void main(String[] args) {\n        new B();\n    }\n}","stemHtml":"<pre><code class=\"language-java\">class A {\n    A() { System.out.print(&quot;A&quot;); }\n}\nclass B extends A {\n    B() { System.out.print(&quot;B&quot;); }\n}\npublic class Demo {\n    public static void main(String[] args) {\n        new B();\n    }\n}</code></pre>","options":[{"key":"A","text":"BA","html":"<p><code>BA</code></p>"},{"key":"B","text":"AB","html":"<p><code>AB</code></p>"},{"key":"C","text":"A","html":"<p><code>A</code></p>"},{"key":"D","text":"B","html":"<p><code>B</code></p>"}],"answer":"B","answerText":"B AB","explanation":"创建 B 对象时，先隐式调用父类 A() 输出 A，再执行 B() 输出 B。","explanationHtml":"<p>创建 <code>B</code> 对象时，先隐式调用父类 <code>A()</code> 输出 <code>A</code>，再执行 <code>B()</code> 输出 <code>B</code>。</p>","important":false},{"id":"java-q87","number":87,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"class A {\n    void f() { System.out.print(\"A\"); }\n}\nclass B extends A {\n    void f() { System.out.print(\"B\"); }\n}\npublic class Demo {\n    public static void main(String[] args) {\n        A a = new B();\n        a.f();\n    }\n}","stemHtml":"<pre><code class=\"language-java\">class A {\n    void f() { System.out.print(&quot;A&quot;); }\n}\nclass B extends A {\n    void f() { System.out.print(&quot;B&quot;); }\n}\npublic class Demo {\n    public static void main(String[] args) {\n        A a = new B();\n        a.f();\n    }\n}</code></pre>","options":[{"key":"A","text":"A","html":"<p><code>A</code></p>"},{"key":"B","text":"B","html":"<p><code>B</code></p>"},{"key":"C","text":"AB","html":"<p><code>AB</code></p>"},{"key":"D","text":"编译错误","html":"<p>编译错误</p>"}],"answer":"B","answerText":"B B","explanation":"引用变量静态类型是 A，实际对象为 B；重写方法按实际对象类型动态调用，因此输出 B。","explanationHtml":"<p>引用变量静态类型是 <code>A</code>，实际对象为 <code>B</code>；重写方法按实际对象类型动态调用，因此输出 <code>B</code>。</p>","important":false},{"id":"java-q88","number":88,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"class A {\n    void f() { System.out.print(\"A\"); }\n}\nclass B extends A {\n    void f() {\n        super.f();\n        System.out.print(\"B\");\n    }\n}\npublic class Demo {\n    public static void main(String[] args) {\n        new B().f();\n    }\n}","stemHtml":"<pre><code class=\"language-java\">class A {\n    void f() { System.out.print(&quot;A&quot;); }\n}\nclass B extends A {\n    void f() {\n        super.f();\n        System.out.print(&quot;B&quot;);\n    }\n}\npublic class Demo {\n    public static void main(String[] args) {\n        new B().f();\n    }\n}</code></pre>","options":[{"key":"A","text":"AB","html":"<p><code>AB</code></p>"},{"key":"B","text":"BA","html":"<p><code>BA</code></p>"},{"key":"C","text":"B","html":"<p><code>B</code></p>"},{"key":"D","text":"A","html":"<p><code>A</code></p>"}],"answer":"A","answerText":"A AB","explanation":"子类方法先调用 super.f() 输出 A，再输出 B，最终为 AB。","explanationHtml":"<p>子类方法先调用 <code>super.f()</code> 输出 <code>A</code>，再输出 <code>B</code>，最终为 <code>AB</code>。</p>","important":false},{"id":"java-q89","number":89,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"class A {\n    A() {\n        this(5);\n        System.out.print(\"A\");\n    }\n    A(int x) {\n        System.out.print(\"B\");\n    }\n}\npublic class Demo {\n    public static void main(String[] args) {\n        new A();\n    }\n}","stemHtml":"<pre><code class=\"language-java\">class A {\n    A() {\n        this(5);\n        System.out.print(&quot;A&quot;);\n    }\n    A(int x) {\n        System.out.print(&quot;B&quot;);\n    }\n}\npublic class Demo {\n    public static void main(String[] args) {\n        new A();\n    }\n}</code></pre>","options":[{"key":"A","text":"AB","html":"<p><code>AB</code></p>"},{"key":"B","text":"BA","html":"<p><code>BA</code></p>"},{"key":"C","text":"B","html":"<p><code>B</code></p>"},{"key":"D","text":"编译错误，this(5) 必须位于第一行","html":"<p>编译错误，this(5) 必须位于第一行</p>"}],"answer":"B","answerText":"B BA","explanation":"无参构造方法先使用 this(5) 调用另一构造方法输出 B，随后自身输出 A。","explanationHtml":"<p>无参构造方法先使用 <code>this(5)</code> 调用另一构造方法输出 <code>B</code>，随后自身输出 <code>A</code>。</p>","important":false},{"id":"java-q90","number":90,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"下列代码的运行结果是（　）。","titleHtml":"下列代码的运行结果是（　）。","stem":"class A { }\nclass B extends A { }\npublic class Demo {\n    public static void main(String[] args) {\n        A a = new A();\n        B b = (B) a;\n    }\n}","stemHtml":"<pre><code class=\"language-java\">class A { }\nclass B extends A { }\npublic class Demo {\n    public static void main(String[] args) {\n        A a = new A();\n        B b = (B) a;\n    }\n}</code></pre>","options":[{"key":"A","text":"编译错误","html":"<p>编译错误</p>"},{"key":"B","text":"正常运行，b 为 null","html":"<p>正常运行，b 为 null</p>"},{"key":"C","text":"正常运行，b 指向新建的 B 对象","html":"<p>正常运行，b 指向新建的 B 对象</p>"},{"key":"D","text":"运行时抛出 ClassCastException","html":"<p>运行时抛出 ClassCastException</p>"}],"answer":"D","answerText":"D 运行时抛出 ClassCastException","explanation":"变量 a 实际指向 A 对象，不是 B 对象；强转语法可通过，但运行时抛出 ClassCastException。","explanationHtml":"<p>变量 <code>a</code> 实际指向 <code>A</code> 对象，不是 <code>B</code> 对象；强转语法可通过，但运行时抛出 <code>ClassCastException</code>。</p>","important":false},{"id":"java-q91","number":91,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"关于抽象类的构造方法，下列说法正确的是（　）。","titleHtml":"关于抽象类的构造方法，下列说法正确的是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"抽象类不能有构造方法","html":"<p>抽象类不能有构造方法</p>"},{"key":"B","text":"抽象类可以有构造方法，由子类创建对象时通过 super 调用","html":"<p>抽象类可以有构造方法，由子类创建对象时通过 super 调用</p>"},{"key":"C","text":"抽象类的构造方法只能被 main 方法调用","html":"<p>抽象类的构造方法只能被 main 方法调用</p>"},{"key":"D","text":"抽象类构造方法必须声明为 abstract","html":"<p>抽象类构造方法必须声明为 abstract</p>"}],"answer":"B","answerText":"B 抽象类可以有构造方法，由子类创建对象时通过 super 调用","explanation":"抽象类可以定义构造方法，子类实例化时会执行父类构造过程。","explanationHtml":"<p>抽象类可以定义构造方法，子类实例化时会执行父类构造过程。</p>","important":false},{"id":"java-q92","number":92,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"interface I {\n    default void f() { System.out.print(\"I\"); }\n}\nclass C implements I {}\npublic class Demo {\n    public static void main(String[] args) {\n        new C().f();\n    }\n}","stemHtml":"<pre><code class=\"language-java\">interface I {\n    default void f() { System.out.print(&quot;I&quot;); }\n}\nclass C implements I {}\npublic class Demo {\n    public static void main(String[] args) {\n        new C().f();\n    }\n}</code></pre>","options":[{"key":"A","text":"编译错误，C 没有实现 f","html":"<p>编译错误，C 没有实现 f</p>"},{"key":"B","text":"运行时抛出异常","html":"<p>运行时抛出异常</p>"},{"key":"C","text":"不输出任何内容","html":"<p>不输出任何内容</p>"},{"key":"D","text":"I","html":"<p><code>I</code></p>"}],"answer":"D","answerText":"D I","explanation":"C 自动继承接口 I 的默认方法 f()，因此输出 I。","explanationHtml":"<p><code>C</code> 自动继承接口 <code>I</code> 的默认方法 <code>f()</code>，因此输出 <code>I</code>。</p>","important":false},{"id":"java-q93","number":93,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"已知接口 I 中定义了 static void f()，类 C 实现了 I。下列调用方式正确的是（　）。","titleHtml":"已知接口 I 中定义了 static void f()，类 C 实现了 I。下列调用方式正确的是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"new I().f();","html":"<p><code>new I().f();</code></p>"},{"key":"B","text":"new C().f();","html":"<p><code>new C().f();</code></p>"},{"key":"C","text":"I.f();","html":"<p><code>I.f();</code></p>"},{"key":"D","text":"C.f();","html":"<p><code>C.f();</code></p>"}],"answer":"C","answerText":"C I.f();","explanation":"接口静态方法属于接口本身，使用接口名 I.f() 调用，不能通过实现类继承调用。","explanationHtml":"<p>接口静态方法属于接口本身，使用接口名 <code>I.f()</code> 调用，不能通过实现类继承调用。</p>","important":false},{"id":"java-q94","number":94,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"下列代码的编译结果是（　）。","titleHtml":"下列代码的编译结果是（　）。","stem":"interface A {\n    default void f() { System.out.print(\"A\"); }\n}\ninterface B {\n    default void f() { System.out.print(\"B\"); }\n}\nclass C implements A, B {}","stemHtml":"<pre><code class=\"language-java\">interface A {\n    default void f() { System.out.print(&quot;A&quot;); }\n}\ninterface B {\n    default void f() { System.out.print(&quot;B&quot;); }\n}\nclass C implements A, B {}</code></pre>","options":[{"key":"A","text":"输出 A","html":"<p>输出 A</p>"},{"key":"B","text":"输出 B","html":"<p>输出 B</p>"},{"key":"C","text":"输出 AB","html":"<p>输出 AB</p>"},{"key":"D","text":"编译错误，C 必须重写 f 以解决冲突","html":"<p>编译错误，C 必须重写 f 以解决冲突</p>"}],"answer":"D","answerText":"D 编译错误，C 必须重写 f 以解决冲突","explanation":"A 和 B 提供签名相同的默认方法，C 必须自行重写 f() 消除冲突。","explanationHtml":"<p><code>A</code> 和 <code>B</code> 提供签名相同的默认方法，<code>C</code> 必须自行重写 <code>f()</code> 消除冲突。</p>","important":false},{"id":"java-q95","number":95,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"下列关于匿名内部类的说法，正确的是（　）。","titleHtml":"下列关于匿名内部类的说法，正确的是（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"它在定义类的同时创建对象，通常用于实现接口或继承类的一次性子类","html":"<p>它在定义类的同时创建对象，通常用于实现接口或继承类的一次性子类</p>"},{"key":"B","text":"它必须显式定义类名","html":"<p>它必须显式定义类名</p>"},{"key":"C","text":"它只能继承抽象类，不能实现接口","html":"<p>它只能继承抽象类，不能实现接口</p>"},{"key":"D","text":"它不能访问外部类的成员","html":"<p>它不能访问外部类的成员</p>"}],"answer":"A","answerText":"A 它在定义类的同时创建对象，通常用于实现接口或继承类的一次性子类","explanation":"匿名内部类没有显式类名，常在表达式中定义并实例化一次性实现类或子类。","explanationHtml":"<p>匿名内部类没有显式类名，常在表达式中定义并实例化一次性实现类或子类。</p>","important":false},{"id":"java-q96","number":96,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"表达式 Comparator c = (a, b) -> a - b; 实现了 Comparator 接口中的哪个方法（　）。","titleHtml":"表达式 Comparator c = (a, b) -&gt; a - b; 实现了 Comparator 接口中的哪个方法（　）。","stem":"","stemHtml":"","options":[{"key":"A","text":"boolean equals(Object obj)","html":"<p><code>boolean equals(Object obj)</code></p>"},{"key":"B","text":"void run()","html":"<p><code>void run()</code></p>"},{"key":"C","text":"int compare(Integer a, Integer b)","html":"<p><code>int compare(Integer a, Integer b)</code></p>"},{"key":"D","text":"Integer apply(Integer a, Integer b)","html":"<p><code>Integer apply(Integer a, Integer b)</code></p>"}],"answer":"C","answerText":"C int compare(Integer a, Integer b)","explanation":"（出题意图；原代码不能编译）\n\n题目意图是 Comparator 的函数式方法 compare(T, T)，按选项选 C；但原题使用原生类型 Comparator，Lambda 形参被视为 Object，不能做减法，因此原代码实际无法编译。应改为 Comparator<Integer> c = (a, b) -> a - b;，此时才匹配选项 C。\n\n建议修正版：\n\nComparator<Integer> c = (a, b) -> a - b;\n\n其中应导入 java.util.Comparator。修正后，Lambda 对应 Comparator<Integer> 的 compare(Integer a, Integer b) 方法。","explanationHtml":"<p>（出题意图；原代码不能编译）</p>\n<p><strong>题目意图是 <code>Comparator</code> 的函数式方法 <code>compare(T, T)</code>，按选项选 C；但原题使用原生类型 <code>Comparator</code>，Lambda 形参被视为 <code>Object</code>，不能做减法，因此原代码实际无法编译。应改为 <code>Comparator&lt;Integer&gt; c = (a, b) -&gt; a - b;</code>，此时才匹配选项 C。</strong></p>\n<p><strong>建议修正版：</strong></p>\n<pre><code class=\"language-java\">Comparator&lt;Integer&gt; c = (a, b) -&gt; a - b;</code></pre>\n<p>其中应导入 <code>java.util.Comparator</code>。修正后，Lambda 对应 <code>Comparator&lt;Integer&gt;</code> 的 <code>compare(Integer a, Integer b)</code> 方法。</p>","important":true},{"id":"java-q97","number":97,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"class Outer {\n    int x = 10;\n    class Inner {\n        void show() { System.out.println(x); }\n    }\n}\npublic class Demo {\n    public static void main(String[] args) {\n        Outer.Inner i = new Outer().new Inner();\n        i.show();\n    }\n}","stemHtml":"<pre><code class=\"language-java\">class Outer {\n    int x = 10;\n    class Inner {\n        void show() { System.out.println(x); }\n    }\n}\npublic class Demo {\n    public static void main(String[] args) {\n        Outer.Inner i = new Outer().new Inner();\n        i.show();\n    }\n}</code></pre>","options":[{"key":"A","text":"0","html":"<p><code>0</code></p>"},{"key":"B","text":"10","html":"<p><code>10</code></p>"},{"key":"C","text":"编译错误，内部类不能访问外部类成员","html":"<p>编译错误，内部类不能访问外部类成员</p>"},{"key":"D","text":"运行时抛出 NullPointerException","html":"<p>运行时抛出 NullPointerException</p>"}],"answer":"B","answerText":"B 10","explanation":"非静态成员内部类可以直接访问所属外部类对象的实例变量 x，所以输出 10。","explanationHtml":"<p>非静态成员内部类可以直接访问所属外部类对象的实例变量 <code>x</code>，所以输出 <code>10</code>。</p>","important":false},{"id":"java-q98","number":98,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"class A {\n    A() { show(); }\n    void show() { System.out.print(\"A\"); }\n}\nclass B extends A {\n    int x = 10;\n    B() { x = 20; }\n    void show() { System.out.print(\"B\" + x); }\n}\npublic class Demo {\n    public static void main(String[] args) {\n        new B();\n    }\n}","stemHtml":"<pre><code class=\"language-java\">class A {\n    A() { show(); }\n    void show() { System.out.print(&quot;A&quot;); }\n}\nclass B extends A {\n    int x = 10;\n    B() { x = 20; }\n    void show() { System.out.print(&quot;B&quot; + x); }\n}\npublic class Demo {\n    public static void main(String[] args) {\n        new B();\n    }\n}</code></pre>","options":[{"key":"A","text":"B10","html":"<p><code>B10</code></p>"},{"key":"B","text":"B20","html":"<p><code>B20</code></p>"},{"key":"C","text":"B0","html":"<p><code>B0</code></p>"},{"key":"D","text":"A0","html":"<p><code>A0</code></p>"}],"answer":"C","answerText":"C B0","explanation":"父类构造方法执行 show() 时会动态调用子类重写版本，但子类的 x = 10 还没执行，x 仍为默认值 0。","explanationHtml":"<p>父类构造方法执行 <code>show()</code> 时会动态调用子类重写版本，但子类的 <code>x = 10</code> 还没执行，<code>x</code> 仍为默认值 <code>0</code>。</p>","important":false},{"id":"java-q99","number":99,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"下列代码的输出结果是（　）。","titleHtml":"下列代码的输出结果是（　）。","stem":"interface A {\n    default void f() { System.out.print(\"A\"); }\n}\ninterface B extends A {\n    default void f() { System.out.print(\"B\"); }\n}\nclass C implements A, B {\n    public void f() { B.super.f(); }\n}\npublic class Demo {\n    public static void main(String[] args) {\n        new C().f();\n    }\n}","stemHtml":"<pre><code class=\"language-java\">interface A {\n    default void f() { System.out.print(&quot;A&quot;); }\n}\ninterface B extends A {\n    default void f() { System.out.print(&quot;B&quot;); }\n}\nclass C implements A, B {\n    public void f() { B.super.f(); }\n}\npublic class Demo {\n    public static void main(String[] args) {\n        new C().f();\n    }\n}</code></pre>","options":[{"key":"A","text":"A","html":"<p><code>A</code></p>"},{"key":"B","text":"B","html":"<p><code>B</code></p>"},{"key":"C","text":"AB","html":"<p><code>AB</code></p>"},{"key":"D","text":"编译错误，B.super.f() 不能调用","html":"<p>编译错误，B.super.f() 不能调用</p>"}],"answer":"B","answerText":"B B","explanation":"B 重写了继承自 A 的默认方法；B.super.f() 明确调用 B 的默认版本，输出 B。","explanationHtml":"<p><code>B</code> 重写了继承自 <code>A</code> 的默认方法；<code>B.super.f()</code> 明确调用 <code>B</code> 的默认版本，输出 <code>B</code>。</p>","important":false},{"id":"java-q100","number":100,"type":"choice","chapter":"继承、多态、接口与 Lambda","title":"下列代码的编译结果是（　）。","titleHtml":"下列代码的编译结果是（　）。","stem":"void test() {\n    int x = 10;\n    Runnable r = () -> System.out.println(x);\n    x = 20;\n    r.run();\n}","stemHtml":"<pre><code class=\"language-java\">void test() {\n    int x = 10;\n    Runnable r = () -&gt; System.out.println(x);\n    x = 20;\n    r.run();\n}</code></pre>","options":[{"key":"A","text":"输出 10","html":"<p>输出 10</p>"},{"key":"B","text":"输出 20","html":"<p>输出 20</p>"},{"key":"C","text":"编译错误，Lambda 引用的局部变量 x 不是有效 final","html":"<p>编译错误，Lambda 引用的局部变量 x 不是有效 final</p>"},{"key":"D","text":"运行时抛出异常","html":"<p>运行时抛出异常</p>"}],"answer":"C","answerText":"C 编译错误，Lambda 引用的局部变量 x 不是有效 final","explanation":"Lambda 捕获的局部变量必须是 final 或“有效 final”；x 后续重新赋值，因此编译失败。","explanationHtml":"<p>Lambda 捕获的局部变量必须是 <code>final</code> 或“有效 final”；<code>x</code> 后续重新赋值，因此编译失败。</p>","important":false}],"notesHtml":"<h3>整理说明</h3>\n<ul>\n<li>保留原题题号、题干、选项与考查意图，对断行、缩进和多余空格进行排版整理。</li>\n<li>将源文件代码中的空白括号（如 <code>String[]</code>、<code>f(        )</code>）按代码语义恢复为 <code>String[]</code>、<code>f()</code>，不改变题目的预期行为。</li>\n<li><strong>第 13 题：</strong> 源文件仅出现 A、B、D 选项，C 选项标注“原文件缺失”，未自行杜撰。</li>\n<li><strong>第 86、87、89、90、98 题：</strong> 源文件将代码中的 <code>A</code>、<code>B</code> 与选项字母混排；根据上下文恢复构造方法、类声明和变量声明。</li>\n<li><strong>第 96 题：</strong> 题目存在代码错误；答案表按出题意图标为 <code>C*</code>，详细解释中说明原代码不能编译及建议修正方式。</li>\n</ul>\n<h3>核心知识点归纳</h3>\n<div class=\"table-scroll\"><table><thead><tr><th>知识点</th><th>建议掌握的内容</th></tr></thead><tbody>\n<tr><td>编译与运行</td><td><code>javac</code> 编译；<code>java</code> 运行；JDK、JRE 与 JVM 的作用</td></tr>\n<tr><td>基本语法</td><td>数据类型、类型转换、运算符优先级、字符串拼接</td></tr>\n<tr><td>数组与流程</td><td>数组默认值与引用、<code>switch</code> 穿透、循环、<code>break</code>/<code>continue</code></td></tr>\n<tr><td>类与对象</td><td>构造方法、方法重载、<code>this</code>、<code>static</code>、访问权限</td></tr>\n<tr><td>参数传递</td><td>Java 一律值传递；对象引用的副本仍可修改同一对象的状态</td></tr>\n<tr><td>继承与多态</td><td><code>extends</code>、<code>super</code>、方法重写、动态分派、类型转换</td></tr>\n<tr><td>接口与 Lambda</td><td>默认方法、静态方法、函数式接口、有效 <code>final</code></td></tr>\n</tbody></table></div>\n<p><strong>容易失分的重点题号：</strong> 26、30、37、39、40、58、59、60、68、69、70、86—90、94、96、98、100。</p>"},{"id":"se","name":"软件工程","shortName":"软件工程","subtitle":"梳理概念，串联方法。让每一次复习都有所收获。","source":"软件工程_期中考试高概率押题与答案.md","questions":[{"id":"se-s1","number":1,"type":"short","chapter":"简答题 · 核心押题","title":"软件危机是什么？如何解决软件危机？软件工程的三要素是什么？","titleHtml":"软件危机是什么？如何解决软件危机？软件工程的三要素是什么？","stem":"","stemHtml":"","options":[],"answer":"参考答案","answerText":"1. 软件危机：指软件开发和维护过程中出现的一系列难以控制的问题。\n2. 解决途径（3点）：①选择好的技术与方法；②使用好的开发工具，提高效率；③进行良好的组织与严密管理。\n3. 软件工程：指导计算机软件开发和维护的学科。\n4. 软件工程三要素：过程、方法、工具。\n背诵口诀：危机“难控制”；解决“技术、工具、管理”；三要素“过程、方法、工具”。","explanation":"1. 软件危机：指软件开发和维护过程中出现的一系列难以控制的问题。\n2. 解决途径（3点）：①选择好的技术与方法；②使用好的开发工具，提高效率；③进行良好的组织与严密管理。\n3. 软件工程：指导计算机软件开发和维护的学科。\n4. 软件工程三要素：过程、方法、工具。\n背诵口诀：危机“难控制”；解决“技术、工具、管理”；三要素“过程、方法、工具”。","explanationHtml":"<ol>\n<li><strong>软件危机</strong>：指软件开发和维护过程中出现的一系列难以控制的问题。</li>\n<li><strong>解决途径（3点）</strong>：①选择好的技术与方法；②使用好的开发工具，提高效率；③进行良好的组织与严密管理。</li>\n<li><strong>软件工程</strong>：指导计算机软件开发和维护的学科。</li>\n<li><strong>软件工程三要素</strong>：过程、方法、工具。</li>\n</ol>\n<ul>\n<li><strong>背诵口诀</strong>：危机“难控制”；解决“技术、工具、管理”；三要素“过程、方法、工具”。</li>\n</ul>","important":false,"priority":"★★★★★"},{"id":"se-s2","number":2,"type":"short","chapter":"简答题 · 核心押题","title":"软件生命周期分为哪三个阶段？各阶段包含哪些工作？","titleHtml":"软件生命周期分为哪三个阶段？各阶段包含哪些工作？","stem":"","stemHtml":"","options":[],"answer":"参考答案","answerText":"1. 计划阶段：可行性研究、需求分析。\n2. 开发阶段：概要设计、详细设计、编码设计、软件测试。\n3. 运行维护阶段：软件投入运行后的维护工作。\n背诵口诀：“计划（可行、需求）→开发（概设、详设、编码、测试）→运行维护”。按本课程提纲的阶段划分作答。","explanation":"1. 计划阶段：可行性研究、需求分析。\n2. 开发阶段：概要设计、详细设计、编码设计、软件测试。\n3. 运行维护阶段：软件投入运行后的维护工作。\n背诵口诀：“计划（可行、需求）→开发（概设、详设、编码、测试）→运行维护”。按本课程提纲的阶段划分作答。","explanationHtml":"<ol>\n<li><strong>计划阶段</strong>：可行性研究、需求分析。</li>\n<li><strong>开发阶段</strong>：概要设计、详细设计、编码设计、软件测试。</li>\n<li><strong>运行维护阶段</strong>：软件投入运行后的维护工作。</li>\n</ol>\n<ul>\n<li><strong>背诵口诀</strong>：“计划（可行、需求）→开发（概设、详设、编码、测试）→运行维护”。按本课程提纲的阶段划分作答。</li>\n</ul>","important":false,"priority":"★★★★★"},{"id":"se-s3","number":3,"type":"short","chapter":"简答题 · 核心押题","title":"需求分析的输入、输出分别是什么？两份主要需求文档有何区别？","titleHtml":"需求分析的输入、输出分别是什么？两份主要需求文档有何区别？","stem":"","stemHtml":"","options":[],"answer":"参考答案","answerText":"1. 输入：可行性分析报告。\n2. 输出：《用户需求报告》和《需求分析规格说明书》。\n3. 《用户需求报告》：面向用户，主要包含运行环境、业务流程、业务功能。\n4. 《需求分析规格说明书》：面向开发者，主要包含业务模型、功能模型、接口模型；提纲将它称为软件生命周期的第一个里程碑。\n5. 需求分类：功能性需求、非功能性需求。\n6. 文档评审的四项内容：一致性、完整性、现实性、有效性。\n背诵口诀：“输入可研；输出双报告；用户看环境/流程/功能；开发看业务/功能/接口模型；评审一完现有”。","explanation":"1. 输入：可行性分析报告。\n2. 输出：《用户需求报告》和《需求分析规格说明书》。\n3. 《用户需求报告》：面向用户，主要包含运行环境、业务流程、业务功能。\n4. 《需求分析规格说明书》：面向开发者，主要包含业务模型、功能模型、接口模型；提纲将它称为软件生命周期的第一个里程碑。\n5. 需求分类：功能性需求、非功能性需求。\n6. 文档评审的四项内容：一致性、完整性、现实性、有效性。\n背诵口诀：“输入可研；输出双报告；用户看环境/流程/功能；开发看业务/功能/接口模型；评审一完现有”。","explanationHtml":"<ol>\n<li><strong>输入</strong>：可行性分析报告。</li>\n<li><strong>输出</strong>：《用户需求报告》和《需求分析规格说明书》。</li>\n<li><strong>《用户需求报告》</strong>：面向用户，主要包含运行环境、业务流程、业务功能。</li>\n<li><strong>《需求分析规格说明书》</strong>：面向开发者，主要包含业务模型、功能模型、接口模型；提纲将它称为软件生命周期的第一个里程碑。</li>\n<li><strong>需求分类</strong>：功能性需求、非功能性需求。</li>\n<li><strong>文档评审的四项内容</strong>：一致性、完整性、现实性、有效性。</li>\n</ol>\n<ul>\n<li><strong>背诵口诀</strong>：“输入可研；输出双报告；用户看环境/流程/功能；开发看业务/功能/接口模型；评审一完现有”。</li>\n</ul>","important":false,"priority":"★★★★★"},{"id":"se-s4","number":4,"type":"short","chapter":"简答题 · 核心押题","title":"为什么要进行可行性研究？可行性研究包括哪些内容？","titleHtml":"为什么要进行可行性研究？可行性研究包括哪些内容？","stem":"","stemHtml":"","options":[],"answer":"参考答案","answerText":"1. 作用：软件的可行性研究是软件立项的前提。\n2. 研究内容（4项）：技术可行性、经济可行性、社会可行性、软件开发风险。\n背诵口诀：“技术、经济、社会、风险”。如题目要求“分别解释”，可结合课堂讲义展开；提纲仅列出四个名称。","explanation":"1. 作用：软件的可行性研究是软件立项的前提。\n2. 研究内容（4项）：技术可行性、经济可行性、社会可行性、软件开发风险。\n背诵口诀：“技术、经济、社会、风险”。如题目要求“分别解释”，可结合课堂讲义展开；提纲仅列出四个名称。","explanationHtml":"<ol>\n<li><strong>作用</strong>：软件的可行性研究是软件立项的前提。</li>\n<li><strong>研究内容（4项）</strong>：技术可行性、经济可行性、社会可行性、软件开发风险。</li>\n</ol>\n<ul>\n<li><strong>背诵口诀</strong>：“技术、经济、社会、风险”。如题目要求“分别解释”，可结合课堂讲义展开；提纲仅列出四个名称。</li>\n</ul>","important":false,"priority":"★★★★★"},{"id":"se-s5","number":5,"type":"short","chapter":"简答题 · 核心押题","title":"软件结构设计的基本原理有哪些？模块化设计要遵循什么原则？","titleHtml":"软件结构设计的基本原理有哪些？模块化设计要遵循什么原则？","stem":"","stemHtml":"","options":[],"answer":"参考答案","answerText":"1. 软件结构设计四项基本原理：信息隐蔽、模块化、抽象、信息传递。\n2. 模块化设计目标：高内聚、低耦合。\n3. 理解（通行教材补充）：内聚反映一个模块内部元素联系的紧密程度；耦合反映模块之间的依赖程度。高内聚有利于模块职责集中，低耦合有利于降低模块间相互影响。\n4. 内聚由低到高（提纲列出的六类）：偶然内聚 → 逻辑内聚 → 时间内聚 → 通信内聚 → 顺序内聚 → 功能内聚。\n5. 耦合由低到高（按通行教材纠正提纲的方向性疑点）：数据耦合 → 控制耦合 → 公共环境耦合 → 内容耦合。\n重要避坑：提纲把“数据→控制→公共环境→内容”标为“由高到低”，这一方向与常见教材相反；四类的相对强弱通常是“数据最弱、内容最强”。考前务必对照老师课件确认。","explanation":"1. 软件结构设计四项基本原理：信息隐蔽、模块化、抽象、信息传递。\n2. 模块化设计目标：高内聚、低耦合。\n3. 理解（通行教材补充）：内聚反映一个模块内部元素联系的紧密程度；耦合反映模块之间的依赖程度。高内聚有利于模块职责集中，低耦合有利于降低模块间相互影响。\n4. 内聚由低到高（提纲列出的六类）：偶然内聚 → 逻辑内聚 → 时间内聚 → 通信内聚 → 顺序内聚 → 功能内聚。\n5. 耦合由低到高（按通行教材纠正提纲的方向性疑点）：数据耦合 → 控制耦合 → 公共环境耦合 → 内容耦合。\n重要避坑：提纲把“数据→控制→公共环境→内容”标为“由高到低”，这一方向与常见教材相反；四类的相对强弱通常是“数据最弱、内容最强”。考前务必对照老师课件确认。","explanationHtml":"<ol>\n<li><strong>软件结构设计四项基本原理</strong>：信息隐蔽、模块化、抽象、信息传递。</li>\n<li><strong>模块化设计目标</strong>：高内聚、低耦合。</li>\n<li><strong>理解（通行教材补充）</strong>：内聚反映一个模块内部元素联系的紧密程度；耦合反映模块之间的依赖程度。高内聚有利于模块职责集中，低耦合有利于降低模块间相互影响。</li>\n<li><strong>内聚由低到高（提纲列出的六类）</strong>：偶然内聚 → 逻辑内聚 → 时间内聚 → 通信内聚 → 顺序内聚 → 功能内聚。</li>\n<li><strong>耦合由低到高（按通行教材纠正提纲的方向性疑点）</strong>：数据耦合 → 控制耦合 → 公共环境耦合 → 内容耦合。</li>\n</ol>\n<ul>\n<li><strong>重要避坑</strong>：提纲把“数据→控制→公共环境→内容”标为“由高到低”，这一方向与常见教材相反；四类的相对强弱通常是“数据最弱、内容最强”。考前务必对照老师课件确认。</li>\n</ul>","important":true,"priority":"★★★★★"},{"id":"se-q1","number":1,"type":"choice","chapter":"单选题 · 核心押题","title":"软件通常由哪三部分组成？","titleHtml":"软件通常由哪三部分组成？","stem":"","stemHtml":"","options":[{"key":"A","text":"硬件、网络、数据库","html":"<p>硬件、网络、数据库</p>"},{"key":"B","text":"程序、数据、文档","html":"<p>程序、数据、文档</p>"},{"key":"C","text":"算法、编译器、操作系统","html":"<p>算法、编译器、操作系统</p>"},{"key":"D","text":"用户、开发者、测试者","html":"<p>用户、开发者、测试者</p>"}],"answer":"B","answerText":"B 程序、数据、文档","explanation":"提纲第1条直接列出软件的三个组成部分。","explanationHtml":"<p>提纲第1条直接列出软件的三个组成部分。</p>","important":false},{"id":"se-q2","number":2,"type":"choice","chapter":"单选题 · 核心押题","title":"软件工程的三要素是（ ）。","titleHtml":"软件工程的三要素是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"人员、成本、进度","html":"<p>人员、成本、进度</p>"},{"key":"B","text":"设计、编码、调试","html":"<p>设计、编码、调试</p>"},{"key":"C","text":"需求、数据、程序","html":"<p>需求、数据、程序</p>"},{"key":"D","text":"过程、方法、工具","html":"<p>过程、方法、工具</p>"}],"answer":"D","answerText":"D 过程、方法、工具","explanation":"注意“软件的三部分组成”和“软件工程三要素”不是同一道题。","explanationHtml":"<p>注意“软件的三部分组成”和“软件工程三要素”不是同一道题。</p>","important":false},{"id":"se-q3","number":3,"type":"choice","chapter":"单选题 · 核心押题","title":"下列对“软件危机”的解释，最符合复习提纲的是（ ）。","titleHtml":"下列对“软件危机”的解释，最符合复习提纲的是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"软件的病毒感染","html":"<p>软件的病毒感染</p>"},{"key":"B","text":"计算机硬件突然损坏","html":"<p>计算机硬件突然损坏</p>"},{"key":"C","text":"软件开发和维护中出现的一系列难以控制的问题","html":"<p>软件开发和维护中出现的一系列难以控制的问题</p>"},{"key":"D","text":"软件用户数量迅速增长","html":"<p>软件用户数量迅速增长</p>"}],"answer":"C","answerText":"C 软件开发和维护中出现的一系列难以控制的问题","explanation":"软件危机不仅涉及开发，也涉及维护。","explanationHtml":"<p>软件危机不仅涉及开发，也涉及维护。</p>","important":false},{"id":"se-q4","number":4,"type":"choice","chapter":"单选题 · 核心押题","title":"软件立项的前提是（ ）。","titleHtml":"软件立项的前提是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"可行性研究","html":"<p>可行性研究</p>"},{"key":"B","text":"软件测试","html":"<p>软件测试</p>"},{"key":"C","text":"详细设计","html":"<p>详细设计</p>"},{"key":"D","text":"编码实现","html":"<p>编码实现</p>"}],"answer":"A","answerText":"A 可行性研究","explanation":"提纲明确：可行性研究是软件立项的前提。","explanationHtml":"<p>提纲明确：可行性研究是软件立项的前提。</p>","important":false},{"id":"se-q5","number":5,"type":"choice","chapter":"单选题 · 核心押题","title":"下列哪组最完整地概括了提纲列出的可行性研究内容？","titleHtml":"下列哪组最完整地概括了提纲列出的可行性研究内容？","stem":"","stemHtml":"","options":[{"key":"A","text":"进度、代码、测试、发布","html":"<p>进度、代码、测试、发布</p>"},{"key":"B","text":"输入、处理、输出、维护","html":"<p>输入、处理、输出、维护</p>"},{"key":"C","text":"技术、经济、社会、软件开发风险","html":"<p>技术、经济、社会、软件开发风险</p>"},{"key":"D","text":"数据库、网络、接口、算法","html":"<p>数据库、网络、接口、算法</p>"}],"answer":"C","answerText":"C 技术、经济、社会、软件开发风险","explanation":"四项内容缺一不可。","explanationHtml":"<p>四项内容缺一不可。</p>","important":false},{"id":"se-q6","number":6,"type":"choice","chapter":"单选题 · 核心押题","title":"根据复习提纲，需求分析的输入是（ ）。","titleHtml":"根据复习提纲，需求分析的输入是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"软件测试报告","html":"<p>软件测试报告</p>"},{"key":"B","text":"可行性分析报告","html":"<p>可行性分析报告</p>"},{"key":"C","text":"概要设计说明书","html":"<p>概要设计说明书</p>"},{"key":"D","text":"用户操作手册","html":"<p>用户操作手册</p>"}],"answer":"B","answerText":"B 可行性分析报告","explanation":"按课程提纲记忆输入项。","explanationHtml":"<p>按课程提纲记忆输入项。</p>","important":false},{"id":"se-q7","number":7,"type":"choice","chapter":"单选题 · 核心押题","title":"需求分析的两项主要输出是（ ）。","titleHtml":"需求分析的两项主要输出是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"用户需求报告与需求分析规格说明书","html":"<p>用户需求报告与需求分析规格说明书</p>"},{"key":"B","text":"详细设计说明书与源代码","html":"<p>详细设计说明书与源代码</p>"},{"key":"C","text":"测试计划与测试用例","html":"<p>测试计划与测试用例</p>"},{"key":"D","text":"部署方案与维护日志","html":"<p>部署方案与维护日志</p>"}],"answer":"A","answerText":"A 用户需求报告与需求分析规格说明书","explanation":"一份面向用户，一份面向开发者。","explanationHtml":"<p>一份面向用户，一份面向开发者。</p>","important":false},{"id":"se-q8","number":8,"type":"choice","chapter":"单选题 · 核心押题","title":"复习提纲称软件生命周期的第一个里程碑是（ ）。","titleHtml":"复习提纲称软件生命周期的第一个里程碑是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"软件开发计划","html":"<p>软件开发计划</p>"},{"key":"B","text":"概要设计说明书","html":"<p>概要设计说明书</p>"},{"key":"C","text":"软件测试报告","html":"<p>软件测试报告</p>"},{"key":"D","text":"需求分析规格说明书","html":"<p>需求分析规格说明书</p>"}],"answer":"D","answerText":"D 需求分析规格说明书","explanation":"这是提纲明确强调的里程碑考点。","explanationHtml":"<p>这是提纲明确强调的里程碑考点。</p>","important":false},{"id":"se-q9","number":9,"type":"choice","chapter":"单选题 · 核心押题","title":"《用户需求报告》主要面向（ ），内容包括运行环境、业务流程和业务功能。","titleHtml":"《用户需求报告》主要面向（ ），内容包括运行环境、业务流程和业务功能。","stem":"","stemHtml":"","options":[{"key":"A","text":"系统管理员","html":"<p>系统管理员</p>"},{"key":"B","text":"用户","html":"<p>用户</p>"},{"key":"C","text":"编译器","html":"<p>编译器</p>"},{"key":"D","text":"测试工具","html":"<p>测试工具</p>"}],"answer":"B","answerText":"B 用户","explanation":"“用户需求报告→用户”；另一份面向开发者。","explanationHtml":"<p>“用户需求报告→用户”；另一份面向开发者。</p>","important":false},{"id":"se-q10","number":10,"type":"choice","chapter":"单选题 · 核心押题","title":"根据提纲，《需求分析规格说明书》主要包括（ ）。","titleHtml":"根据提纲，《需求分析规格说明书》主要包括（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"成本模型、进度模型、人员模型","html":"<p>成本模型、进度模型、人员模型</p>"},{"key":"B","text":"业务模型、功能模型、接口模型","html":"<p>业务模型、功能模型、接口模型</p>"},{"key":"C","text":"硬件模型、网络模型、部署模型","html":"<p>硬件模型、网络模型、部署模型</p>"},{"key":"D","text":"测试模型、维护模型、验收模型","html":"<p>测试模型、维护模型、验收模型</p>"}],"answer":"B","answerText":"B 业务模型、功能模型、接口模型","explanation":"考“业务、功能、接口”三项模型。","explanationHtml":"<p>考“业务、功能、接口”三项模型。</p>","important":false},{"id":"se-q11","number":11,"type":"choice","chapter":"单选题 · 核心押题","title":"需求可分为（ ）。","titleHtml":"需求可分为（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"静态需求和动态需求","html":"<p>静态需求和动态需求</p>"},{"key":"B","text":"初级需求和高级需求","html":"<p>初级需求和高级需求</p>"},{"key":"C","text":"功能性需求和非功能性需求","html":"<p>功能性需求和非功能性需求</p>"},{"key":"D","text":"本地需求和远程需求","html":"<p>本地需求和远程需求</p>"}],"answer":"C","answerText":"C 功能性需求和非功能性需求","explanation":"这是需求分类的基础题。","explanationHtml":"<p>这是需求分类的基础题。</p>","important":false},{"id":"se-q12","number":12,"type":"choice","chapter":"单选题 · 核心押题","title":"下列哪组工作属于本提纲划分的“计划阶段”？","titleHtml":"下列哪组工作属于本提纲划分的“计划阶段”？","stem":"","stemHtml":"","options":[{"key":"A","text":"可行性研究与需求分析","html":"<p>可行性研究与需求分析</p>"},{"key":"B","text":"概要设计与详细设计","html":"<p>概要设计与详细设计</p>"},{"key":"C","text":"编码与测试","html":"<p>编码与测试</p>"},{"key":"D","text":"软件运行与维护","html":"<p>软件运行与维护</p>"}],"answer":"A","answerText":"A 可行性研究与需求分析","explanation":"严格依照本课程提纲的三阶段划分。","explanationHtml":"<p>严格依照本课程提纲的三阶段划分。</p>","important":false},{"id":"se-q13","number":13,"type":"choice","chapter":"单选题 · 核心押题","title":"下列哪组工作全部处于提纲所列的“开发阶段”？","titleHtml":"下列哪组工作全部处于提纲所列的“开发阶段”？","stem":"","stemHtml":"","options":[{"key":"A","text":"可行性研究、需求分析","html":"<p>可行性研究、需求分析</p>"},{"key":"B","text":"运营、维护、升级","html":"<p>运营、维护、升级</p>"},{"key":"C","text":"市场调研、需求分析、验收","html":"<p>市场调研、需求分析、验收</p>"},{"key":"D","text":"概要设计、详细设计、编码设计、软件测试","html":"<p>概要设计、详细设计、编码设计、软件测试</p>"}],"answer":"D","answerText":"D 概要设计、详细设计、编码设计、软件测试","explanation":"开发阶段列出的四项工作需要完整记忆。","explanationHtml":"<p>开发阶段列出的四项工作需要完整记忆。</p>","important":false},{"id":"se-q14","number":14,"type":"choice","chapter":"单选题 · 核心押题","title":"软件生命周期三个阶段中的最后一个阶段是（ ）。","titleHtml":"软件生命周期三个阶段中的最后一个阶段是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"可行性研究阶段","html":"<p>可行性研究阶段</p>"},{"key":"B","text":"编码阶段","html":"<p>编码阶段</p>"},{"key":"C","text":"运行维护阶段","html":"<p>运行维护阶段</p>"},{"key":"D","text":"需求分析阶段","html":"<p>需求分析阶段</p>"}],"answer":"C","answerText":"C 运行维护阶段","explanation":"三大阶段：计划→开发→运行维护。","explanationHtml":"<p>三大阶段：计划→开发→运行维护。</p>","important":false},{"id":"se-q15","number":15,"type":"choice","chapter":"单选题 · 核心押题","title":"概要设计的输入是（ ）。","titleHtml":"概要设计的输入是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"需求规格说明书","html":"<p>需求规格说明书</p>"},{"key":"B","text":"软件维护报告","html":"<p>软件维护报告</p>"},{"key":"C","text":"源代码文件","html":"<p>源代码文件</p>"},{"key":"D","text":"测试缺陷报告","html":"<p>测试缺陷报告</p>"}],"answer":"A","answerText":"A 需求规格说明书","explanation":"“需求规格说明书”是提纲第15条的称谓。","explanationHtml":"<p>“需求规格说明书”是提纲第15条的称谓。</p>","important":false},{"id":"se-q16","number":16,"type":"choice","chapter":"单选题 · 核心押题","title":"概要设计的输出是（ ）。","titleHtml":"概要设计的输出是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"用户需求报告","html":"<p>用户需求报告</p>"},{"key":"B","text":"工程进度计划","html":"<p>工程进度计划</p>"},{"key":"C","text":"概要设计说明书","html":"<p>概要设计说明书</p>"},{"key":"D","text":"详细测试日志","html":"<p>详细测试日志</p>"}],"answer":"C","answerText":"C 概要设计说明书","explanation":"一进一出是常见选择题。","explanationHtml":"<p>一进一出是常见选择题。</p>","important":false},{"id":"se-q17","number":17,"type":"choice","chapter":"单选题 · 核心押题","title":"提纲列出的概要设计方法包括（ ）。","titleHtml":"提纲列出的概要设计方法包括（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"只采用面向对象编码法","html":"<p>只采用面向对象编码法</p>"},{"key":"B","text":"只采用人工测试法","html":"<p>只采用人工测试法</p>"},{"key":"C","text":"面向过程调试法与黑盒测试法","html":"<p>面向过程调试法与黑盒测试法</p>"},{"key":"D","text":"结构化（面向数据流）设计方法与面向数据结构设计方法","html":"<p>结构化（面向数据流）设计方法与面向数据结构设计方法</p>"}],"answer":"D","answerText":"D 结构化（面向数据流）设计方法与面向数据结构设计方法","explanation":"不要把“设计方法”与“测试方法”混淆。","explanationHtml":"<p>不要把“设计方法”与“测试方法”混淆。</p>","important":false},{"id":"se-q18","number":18,"type":"choice","chapter":"单选题 · 核心押题","title":"用来描述模块之间调用关系的图形工具是（ ）。","titleHtml":"用来描述模块之间调用关系的图形工具是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"ER图","html":"<p>ER图</p>"},{"key":"B","text":"结构图","html":"<p>结构图</p>"},{"key":"C","text":"甘特图","html":"<p>甘特图</p>"},{"key":"D","text":"数据字典","html":"<p>数据字典</p>"}],"answer":"B","answerText":"B 结构图","explanation":"层次图着重层次；结构图着重调用。","explanationHtml":"<p>层次图着重层次；结构图着重调用。</p>","important":false},{"id":"se-q19","number":19,"type":"choice","chapter":"单选题 · 核心押题","title":"模块化设计应尽量做到（ ）。","titleHtml":"模块化设计应尽量做到（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"高内聚、低耦合","html":"<p>高内聚、低耦合</p>"},{"key":"B","text":"低内聚、高耦合","html":"<p>低内聚、高耦合</p>"},{"key":"C","text":"高内聚、高耦合","html":"<p>高内聚、高耦合</p>"},{"key":"D","text":"低内聚、低耦合","html":"<p>低内聚、低耦合</p>"}],"answer":"A","answerText":"A 高内聚、低耦合","explanation":"最核心的设计口号之一。","explanationHtml":"<p>最核心的设计口号之一。</p>","important":false},{"id":"se-q20","number":20,"type":"choice","chapter":"单选题 · 核心押题","title":"在提纲列出的内聚类型中，内聚性最强的是（ ）。","titleHtml":"在提纲列出的内聚类型中，内聚性最强的是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"偶然内聚","html":"<p>偶然内聚</p>"},{"key":"B","text":"逻辑内聚","html":"<p>逻辑内聚</p>"},{"key":"C","text":"功能内聚","html":"<p>功能内聚</p>"},{"key":"D","text":"时间内聚","html":"<p>时间内聚</p>"}],"answer":"C","answerText":"C 功能内聚","explanation":"内聚由低到高以“功能内聚”为终点。","explanationHtml":"<p>内聚由低到高以“功能内聚”为终点。</p>","important":false},{"id":"se-q21","number":21,"type":"choice","chapter":"单选题 · 核心押题","title":"按照常见教材中提纲列出的四种类型，耦合最强的是（ ）。","titleHtml":"按照常见教材中提纲列出的四种类型，耦合最强的是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"数据耦合","html":"<p>数据耦合</p>"},{"key":"B","text":"控制耦合","html":"<p>控制耦合</p>"},{"key":"C","text":"公共环境耦合","html":"<p>公共环境耦合</p>"},{"key":"D","text":"内容耦合","html":"<p>内容耦合</p>"}],"answer":"D","answerText":"D 内容耦合","explanation":"此题按常见教材理解；提纲“由高到低”方向可能误写，见避坑说明。","explanationHtml":"<p>此题按常见教材理解；提纲“由高到低”方向可能误写，见避坑说明。</p>","important":true},{"id":"se-q22","number":22,"type":"choice","chapter":"单选题 · 核心押题","title":"需求分析文档评审的主要内容是（ ）。","titleHtml":"需求分析文档评审的主要内容是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"一致性、完整性、现实性、有效性","html":"<p>一致性、完整性、现实性、有效性</p>"},{"key":"B","text":"速度、容量、耗电、成本","html":"<p>速度、容量、耗电、成本</p>"},{"key":"C","text":"语法、缩进、注释、命名","html":"<p>语法、缩进、注释、命名</p>"},{"key":"D","text":"安全、加密、审计、备份","html":"<p>安全、加密、审计、备份</p>"}],"answer":"A","answerText":"A 一致性、完整性、现实性、有效性","explanation":"四个词需要逐字记忆。","explanationHtml":"<p>四个词需要逐字记忆。</p>","important":false},{"id":"se-q23","number":23,"type":"choice","chapter":"单选题 · 核心押题","title":"面向对象分析建立的三个模型是（ ）。","titleHtml":"面向对象分析建立的三个模型是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"数据库模型、网络模型、硬件模型","html":"<p>数据库模型、网络模型、硬件模型</p>"},{"key":"B","text":"对象模型、动态模型、功能模型","html":"<p>对象模型、动态模型、功能模型</p>"},{"key":"C","text":"概念模型、逻辑模型、物理模型","html":"<p>概念模型、逻辑模型、物理模型</p>"},{"key":"D","text":"层次模型、关系模型、网状模型","html":"<p>层次模型、关系模型、网状模型</p>"}],"answer":"B","answerText":"B 对象模型、动态模型、功能模型","explanation":"不要与数据库设计三阶段混淆。","explanationHtml":"<p>不要与数据库设计三阶段混淆。</p>","important":false},{"id":"se-q24","number":24,"type":"choice","chapter":"单选题 · 核心押题","title":"提纲列出的面向对象方法中类之间的关系包括（ ）。","titleHtml":"提纲列出的面向对象方法中类之间的关系包括（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"顺序、选择、循环","html":"<p>顺序、选择、循环</p>"},{"key":"B","text":"输入、加工、输出","html":"<p>输入、加工、输出</p>"},{"key":"C","text":"静态、动态、物理","html":"<p>静态、动态、物理</p>"},{"key":"D","text":"关联、整体—部分、一般—特殊","html":"<p>关联、整体—部分、一般—特殊</p>"}],"answer":"D","answerText":"D 关联、整体—部分、一般—特殊","explanation":"三个名称与对象模型的三类模型不同。","explanationHtml":"<p>三个名称与对象模型的三类模型不同。</p>","important":false},{"id":"se-q25","number":25,"type":"choice","chapter":"单选题 · 核心押题","title":"根据提纲，数据库设计阶段与软件阶段的对应关系正确的是（ ）。","titleHtml":"根据提纲，数据库设计阶段与软件阶段的对应关系正确的是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"概念设计—需求分析；逻辑设计—概要设计；物理设计—详细设计","html":"<p>概念设计—需求分析；逻辑设计—概要设计；物理设计—详细设计</p>"},{"key":"B","text":"概念设计—编码；逻辑设计—测试；物理设计—维护","html":"<p>概念设计—编码；逻辑设计—测试；物理设计—维护</p>"},{"key":"C","text":"概念设计—概要设计；逻辑设计—详细设计；物理设计—需求分析","html":"<p>概念设计—概要设计；逻辑设计—详细设计；物理设计—需求分析</p>"},{"key":"D","text":"概念设计—维护；逻辑设计—编码；物理设计—测试","html":"<p>概念设计—维护；逻辑设计—编码；物理设计—测试</p>"}],"answer":"A","answerText":"A 概念设计—需求分析；逻辑设计—概要设计；物理设计—详细设计","explanation":"三组对应关系直接背下来。","explanationHtml":"<p>三组对应关系直接背下来。</p>","important":false},{"id":"se-t1","number":1,"type":"judge","chapter":"判断题 · 核心押题","title":"软件包括程序、数据和文档。","titleHtml":"软件包括程序、数据和文档。","stem":"","stemHtml":"","options":[],"answer":"√","answerText":"√","explanation":"提纲第1条。","explanationHtml":"<p>提纲第1条。</p>","important":false},{"id":"se-t2","number":2,"type":"judge","chapter":"判断题 · 核心押题","title":"软件可行性研究是在软件正式立项之后才进行的。","titleHtml":"软件可行性研究是在软件正式立项之后才进行的。","stem":"","stemHtml":"","options":[],"answer":"×","answerText":"×","explanation":"提纲明确说可行性研究是软件立项的前提。","explanationHtml":"<p>提纲明确说可行性研究是软件立项的前提。</p>","important":false},{"id":"se-t3","number":3,"type":"judge","chapter":"判断题 · 核心押题","title":"需求分析只需考虑功能性需求，不必考虑非功能性需求。","titleHtml":"需求分析只需考虑功能性需求，不必考虑非功能性需求。","stem":"","stemHtml":"","options":[],"answer":"×","answerText":"×","explanation":"需求分析分为功能性需求和非功能性需求。","explanationHtml":"<p>需求分析分为功能性需求和非功能性需求。</p>","important":false},{"id":"se-t4","number":4,"type":"judge","chapter":"判断题 · 核心押题","title":"提纲把《需求分析规格说明书》称为软件生命周期的第一个里程碑。","titleHtml":"提纲把《需求分析规格说明书》称为软件生命周期的第一个里程碑。","stem":"","stemHtml":"","options":[],"answer":"√","answerText":"√","explanation":"注意不是《用户需求报告》。","explanationHtml":"<p>注意不是《用户需求报告》。</p>","important":false},{"id":"se-t5","number":5,"type":"judge","chapter":"判断题 · 核心押题","title":"按照提纲，开发阶段包括概要设计、详细设计、编码设计和软件测试。","titleHtml":"按照提纲，开发阶段包括概要设计、详细设计、编码设计和软件测试。","stem":"","stemHtml":"","options":[],"answer":"√","answerText":"√","explanation":"提纲第8条。","explanationHtml":"<p>提纲第8条。</p>","important":false},{"id":"se-t6","number":6,"type":"judge","chapter":"判断题 · 核心押题","title":"模块化设计越是低内聚、高耦合越好。","titleHtml":"模块化设计越是低内聚、高耦合越好。","stem":"","stemHtml":"","options":[],"answer":"×","answerText":"×","explanation":"应为高内聚、低耦合。","explanationHtml":"<p>应为高内聚、低耦合。</p>","important":false},{"id":"se-t7","number":7,"type":"judge","chapter":"判断题 · 核心押题","title":"在提纲列出的六种内聚中，功能内聚强于偶然内聚。","titleHtml":"在提纲列出的六种内聚中，功能内聚强于偶然内聚。","stem":"","stemHtml":"","options":[],"answer":"√","answerText":"√","explanation":"功能内聚最强，偶然内聚最弱。","explanationHtml":"<p>功能内聚最强，偶然内聚最弱。</p>","important":false},{"id":"se-t8","number":8,"type":"judge","chapter":"判断题 · 核心押题","title":"面向对象方法将数据与处理相结合，并强调以数据为核心。","titleHtml":"面向对象方法将数据与处理相结合，并强调以数据为核心。","stem":"","stemHtml":"","options":[],"answer":"√","answerText":"√","explanation":"提纲第19条。","explanationHtml":"<p>提纲第19条。</p>","important":false},{"id":"se-t9","number":9,"type":"judge","chapter":"判断题 · 核心押题","title":"根据提纲，数据库逻辑设计对应详细设计阶段。","titleHtml":"根据提纲，数据库逻辑设计对应详细设计阶段。","stem":"","stemHtml":"","options":[],"answer":"×","answerText":"×","explanation":"逻辑设计对应概要设计，物理设计才对应详细设计。","explanationHtml":"<p>逻辑设计对应概要设计，物理设计才对应详细设计。</p>","important":false},{"id":"se-t10","number":10,"type":"judge","chapter":"判断题 · 核心押题","title":"可行性研究包括技术可行性、经济可行性、社会可行性和软件开发风险。","titleHtml":"可行性研究包括技术可行性、经济可行性、社会可行性和软件开发风险。","stem":"","stemHtml":"","options":[],"answer":"√","answerText":"√","explanation":"提纲第18条完整列出四项。","explanationHtml":"<p>提纲第18条完整列出四项。</p>","important":false},{"id":"se-s6","number":6,"type":"short","chapter":"简答题 · 高频替补","title":"比较瀑布模型、快速原型模型和增量模型的特点及适用场景。","titleHtml":"比较瀑布模型、快速原型模型和增量模型的特点及适用场景。","stem":"","stemHtml":"","options":[],"answer":"参考答案","answerText":"1. 瀑布模型：开发活动按阶段顺序推进，强调文档和阶段成果；适合需求比较明确、稳定的项目；缺点是面对需求变更时调整成本较高。\n2. 快速原型模型：先构建可供用户体验的原型，通过用户反馈澄清和完善需求；适合需求不够明确、交互需求较强的项目；注意原型不等于经过充分工程化的最终产品。\n3. 增量模型：把系统划分为若干增量，分批开发、测试和交付可用功能；适合希望尽早交付核心功能并持续扩展的项目；需要注意整体架构和增量间集成。\n4. 对比关键词：瀑布＝阶段顺序；快速原型＝原型与反馈；增量＝分批交付。\n说明：第28条明确点名了三种模型，但提纲没有给出定义、优缺点，以上为补充预测答案；考试表述以老师课件为准。","explanation":"1. 瀑布模型：开发活动按阶段顺序推进，强调文档和阶段成果；适合需求比较明确、稳定的项目；缺点是面对需求变更时调整成本较高。\n2. 快速原型模型：先构建可供用户体验的原型，通过用户反馈澄清和完善需求；适合需求不够明确、交互需求较强的项目；注意原型不等于经过充分工程化的最终产品。\n3. 增量模型：把系统划分为若干增量，分批开发、测试和交付可用功能；适合希望尽早交付核心功能并持续扩展的项目；需要注意整体架构和增量间集成。\n4. 对比关键词：瀑布＝阶段顺序；快速原型＝原型与反馈；增量＝分批交付。\n说明：第28条明确点名了三种模型，但提纲没有给出定义、优缺点，以上为补充预测答案；考试表述以老师课件为准。","explanationHtml":"<ol>\n<li><strong>瀑布模型</strong>：开发活动按阶段顺序推进，强调文档和阶段成果；适合需求比较明确、稳定的项目；缺点是面对需求变更时调整成本较高。</li>\n<li><strong>快速原型模型</strong>：先构建可供用户体验的原型，通过用户反馈澄清和完善需求；适合需求不够明确、交互需求较强的项目；注意原型不等于经过充分工程化的最终产品。</li>\n<li><strong>增量模型</strong>：把系统划分为若干增量，分批开发、测试和交付可用功能；适合希望尽早交付核心功能并持续扩展的项目；需要注意整体架构和增量间集成。</li>\n<li><strong>对比关键词</strong>：瀑布＝阶段顺序；快速原型＝原型与反馈；增量＝分批交付。</li>\n</ol>\n<ul>\n<li><strong>说明</strong>：第28条明确点名了三种模型，但提纲没有给出定义、优缺点，以上为补充预测答案；考试表述以老师课件为准。</li>\n</ul>","important":false,"priority":"★★★★★"},{"id":"se-s7","number":7,"type":"short","chapter":"简答题 · 高频替补","title":"概要设计的输入、输出、设计方法和常用图形工具分别是什么？","titleHtml":"概要设计的输入、输出、设计方法和常用图形工具分别是什么？","stem":"","stemHtml":"","options":[],"answer":"参考答案","answerText":"1. 输入：需求规格说明书。\n2. 输出：概要设计说明书。\n3. 方法：结构化方法（面向数据流设计方法）和面向数据结构设计方法。\n4. 图形工具：层次图（表示自上而下的层次结构）；结构图（表示模块之间的调用关系）。\n易混点：“层次图看层级；结构图看调用”。","explanation":"1. 输入：需求规格说明书。\n2. 输出：概要设计说明书。\n3. 方法：结构化方法（面向数据流设计方法）和面向数据结构设计方法。\n4. 图形工具：层次图（表示自上而下的层次结构）；结构图（表示模块之间的调用关系）。\n易混点：“层次图看层级；结构图看调用”。","explanationHtml":"<ol>\n<li><strong>输入</strong>：需求规格说明书。</li>\n<li><strong>输出</strong>：概要设计说明书。</li>\n<li><strong>方法</strong>：结构化方法（面向数据流设计方法）和面向数据结构设计方法。</li>\n<li><strong>图形工具</strong>：层次图（表示自上而下的层次结构）；结构图（表示模块之间的调用关系）。</li>\n</ol>\n<ul>\n<li><strong>易混点</strong>：“层次图看层级；结构图看调用”。</li>\n</ul>","important":false,"priority":"★★★★☆"},{"id":"se-s8","number":8,"type":"short","chapter":"简答题 · 高频替补","title":"需求分析有哪些常用分析工具？需求分析的目的是什么？","titleHtml":"需求分析有哪些常用分析工具？需求分析的目的是什么？","stem":"","stemHtml":"","options":[],"answer":"参考答案","answerText":"1. 常用工具：数据流图、IPO图、状态转换图、数据字典、ER图。\n2. 描述形式：文字、图形、表格。\n3. 目的：首先从用户端获得“软件应该做什么”，并对软件功能、性能、软件确认等进行描述（提纲原用语）。\n背诵口诀：“数据流、IPO、状态、字典、ER”；需求分析回答“做什么”。","explanation":"1. 常用工具：数据流图、IPO图、状态转换图、数据字典、ER图。\n2. 描述形式：文字、图形、表格。\n3. 目的：首先从用户端获得“软件应该做什么”，并对软件功能、性能、软件确认等进行描述（提纲原用语）。\n背诵口诀：“数据流、IPO、状态、字典、ER”；需求分析回答“做什么”。","explanationHtml":"<ol>\n<li><strong>常用工具</strong>：数据流图、IPO图、状态转换图、数据字典、ER图。</li>\n<li><strong>描述形式</strong>：文字、图形、表格。</li>\n<li><strong>目的</strong>：首先从用户端获得“软件应该做什么”，并对软件功能、性能、软件确认等进行描述（提纲原用语）。</li>\n</ol>\n<ul>\n<li><strong>背诵口诀</strong>：“数据流、IPO、状态、字典、ER”；需求分析回答“做什么”。</li>\n</ul>","important":false,"priority":"★★★★☆"},{"id":"se-s9","number":9,"type":"short","chapter":"简答题 · 高频替补","title":"面向对象分析建立哪些模型？类之间有哪些关系？","titleHtml":"面向对象分析建立哪些模型？类之间有哪些关系？","stem":"","stemHtml":"","options":[],"answer":"参考答案","answerText":"1. 方法特点：模拟人的思维习惯，把数据与处理结合，以数据为核心。\n2. 分析模型：对象模型、动态模型、功能模型。\n3. 类之间关系：关联关系、整体—部分关系、一般—特殊关系。\n背诵口诀：“对象、动态、功能；关联、整体部分、一般特殊”。","explanation":"1. 方法特点：模拟人的思维习惯，把数据与处理结合，以数据为核心。\n2. 分析模型：对象模型、动态模型、功能模型。\n3. 类之间关系：关联关系、整体—部分关系、一般—特殊关系。\n背诵口诀：“对象、动态、功能；关联、整体部分、一般特殊”。","explanationHtml":"<ol>\n<li><strong>方法特点</strong>：模拟人的思维习惯，把数据与处理结合，以数据为核心。</li>\n<li><strong>分析模型</strong>：对象模型、动态模型、功能模型。</li>\n<li><strong>类之间关系</strong>：关联关系、整体—部分关系、一般—特殊关系。</li>\n</ol>\n<ul>\n<li><strong>背诵口诀</strong>：“对象、动态、功能；关联、整体部分、一般特殊”。</li>\n</ul>","important":false,"priority":"★★★★☆"},{"id":"se-s10","number":10,"type":"short","chapter":"简答题 · 高频替补","title":"数据库设计分为哪三个阶段？分别对应软件生命周期中的哪个设计阶段？","titleHtml":"数据库设计分为哪三个阶段？分别对应软件生命周期中的哪个设计阶段？","stem":"","stemHtml":"","options":[],"answer":"参考答案","answerText":"1. 概念设计：需求分析阶段。\n2. 逻辑设计：概要设计阶段。\n3. 物理设计：详细设计阶段。\n背诵口诀：“概念—需求；逻辑—概要；物理—详细”。这是一组很适合出排序/配对题的考点。","explanation":"1. 概念设计：需求分析阶段。\n2. 逻辑设计：概要设计阶段。\n3. 物理设计：详细设计阶段。\n背诵口诀：“概念—需求；逻辑—概要；物理—详细”。这是一组很适合出排序/配对题的考点。","explanationHtml":"<ol>\n<li><strong>概念设计</strong>：需求分析阶段。</li>\n<li><strong>逻辑设计</strong>：概要设计阶段。</li>\n<li><strong>物理设计</strong>：详细设计阶段。</li>\n</ol>\n<ul>\n<li><strong>背诵口诀</strong>：“概念—需求；逻辑—概要；物理—详细”。这是一组很适合出排序/配对题的考点。</li>\n</ul>","important":false,"priority":"★★★★☆"},{"id":"se-s11","number":11,"type":"short","chapter":"简答题 · 高频替补","title":"怎样理解ER图？如何把多对多的实体联系转化为便于实现的关系？","titleHtml":"怎样理解ER图？如何把多对多的实体联系转化为便于实现的关系？","stem":"","stemHtml":"","options":[],"answer":"参考答案","answerText":"1. 用途：实体—联系图（ER图）用于描述数据对象及其相互之间的联系。\n2. 常见图形：矩形表示实体，菱形表示联系，椭圆表示属性。\n3. 多对多关系处理：采用提纲所说的“第三者插足模式”，即引入联系实体/中间表，把多对多拆解为两个一对多关系（通行数据库设计解释）。\n提醒：ER图符号以及关系转换的记法，以课堂图例为准。","explanation":"1. 用途：实体—联系图（ER图）用于描述数据对象及其相互之间的联系。\n2. 常见图形：矩形表示实体，菱形表示联系，椭圆表示属性。\n3. 多对多关系处理：采用提纲所说的“第三者插足模式”，即引入联系实体/中间表，把多对多拆解为两个一对多关系（通行数据库设计解释）。\n提醒：ER图符号以及关系转换的记法，以课堂图例为准。","explanationHtml":"<ol>\n<li><strong>用途</strong>：实体—联系图（ER图）用于描述数据对象及其相互之间的联系。</li>\n<li><strong>常见图形</strong>：矩形表示实体，菱形表示联系，椭圆表示属性。</li>\n<li><strong>多对多关系处理</strong>：采用提纲所说的“第三者插足模式”，即引入联系实体/中间表，把多对多拆解为两个一对多关系（通行数据库设计解释）。</li>\n</ol>\n<ul>\n<li><strong>提醒</strong>：ER图符号以及关系转换的记法，以课堂图例为准。</li>\n</ul>","important":false,"priority":"★★★☆☆"},{"id":"se-s12","number":12,"type":"short","chapter":"简答题 · 高频替补","title":"说明甘特图与工程网络图在软件开发进度安排中的作用。","titleHtml":"说明甘特图与工程网络图在软件开发进度安排中的作用。","stem":"","stemHtml":"","options":[],"answer":"参考答案","answerText":"1. 共同点：用于软件开发工程进度计划，帮助表示任务安排和并行关系。\n2. 甘特图：更直观呈现任务的时间起止、持续时间和重叠安排。\n3. 工程网络图：更强调任务间的先后依赖及网络关系。\n提醒：提纲第14条有“气息表示”的文字笔误；不要把“甘特图”和“工程网络图”的侧重点混淆。","explanation":"1. 共同点：用于软件开发工程进度计划，帮助表示任务安排和并行关系。\n2. 甘特图：更直观呈现任务的时间起止、持续时间和重叠安排。\n3. 工程网络图：更强调任务间的先后依赖及网络关系。\n提醒：提纲第14条有“气息表示”的文字笔误；不要把“甘特图”和“工程网络图”的侧重点混淆。","explanationHtml":"<ol>\n<li><strong>共同点</strong>：用于软件开发工程进度计划，帮助表示任务安排和并行关系。</li>\n<li><strong>甘特图</strong>：更直观呈现任务的时间起止、持续时间和重叠安排。</li>\n<li><strong>工程网络图</strong>：更强调任务间的先后依赖及网络关系。</li>\n</ol>\n<ul>\n<li><strong>提醒</strong>：提纲第14条有“气息表示”的文字笔误；不要把“甘特图”和“工程网络图”的侧重点混淆。</li>\n</ul>","important":false,"priority":"★★★☆☆"},{"id":"se-q26","number":26,"type":"choice","chapter":"单选题 · 加练题库","title":"软件工程进度计划常用的图形工具是（ ）。","titleHtml":"软件工程进度计划常用的图形工具是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"ER图和用例图","html":"<p>ER图和用例图</p>"},{"key":"B","text":"甘特图和工程网络图","html":"<p>甘特图和工程网络图</p>"},{"key":"C","text":"状态转换图和类图","html":"<p>状态转换图和类图</p>"},{"key":"D","text":"数据字典和流程表","html":"<p>数据字典和流程表</p>"}],"answer":"B","answerText":"B 甘特图和工程网络图","explanation":"提纲第14条。","explanationHtml":"<p>提纲第14条。</p>","important":false},{"id":"se-q27","number":27,"type":"choice","chapter":"单选题 · 加练题库","title":"处理多对多实体联系时，提纲提到的方法是（ ）。","titleHtml":"处理多对多实体联系时，提纲提到的方法是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"自顶向下分解法","html":"<p>自顶向下分解法</p>"},{"key":"B","text":"黑盒测试法","html":"<p>黑盒测试法</p>"},{"key":"C","text":"第三者插足模式","html":"<p>第三者插足模式</p>"},{"key":"D","text":"代码重构法","html":"<p>代码重构法</p>"}],"answer":"C","answerText":"C 第三者插足模式","explanation":"通过中间实体/中间表转化关系。","explanationHtml":"<p>通过中间实体/中间表转化关系。</p>","important":false},{"id":"se-q28","number":28,"type":"choice","chapter":"单选题 · 加练题库","title":"描述数据对象及其相互联系的模型通常用（ ）。","titleHtml":"描述数据对象及其相互联系的模型通常用（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"实体—联系图（ER图）","html":"<p>实体—联系图（ER图）</p>"},{"key":"B","text":"甘特图","html":"<p>甘特图</p>"},{"key":"C","text":"程序流程图","html":"<p>程序流程图</p>"},{"key":"D","text":"工程网络图","html":"<p>工程网络图</p>"}],"answer":"A","answerText":"A 实体—联系图（ER图）","explanation":"ER图是数据模型的重要描述工具。","explanationHtml":"<p>ER图是数据模型的重要描述工具。</p>","important":false},{"id":"se-q29","number":29,"type":"choice","chapter":"单选题 · 加练题库","title":"在常见ER图记法中，菱形通常表示（ ）。","titleHtml":"在常见ER图记法中，菱形通常表示（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"实体","html":"<p>实体</p>"},{"key":"B","text":"联系","html":"<p>联系</p>"},{"key":"C","text":"属性","html":"<p>属性</p>"},{"key":"D","text":"数据流","html":"<p>数据流</p>"}],"answer":"B","answerText":"B 联系","explanation":"一般矩形为实体、椭圆为属性；具体看课件。","explanationHtml":"<p>一般矩形为实体、椭圆为属性；具体看课件。</p>","important":false},{"id":"se-q30","number":30,"type":"choice","chapter":"单选题 · 加练题库","title":"在常见UML用例图中，用椭圆表示的是（ ）。","titleHtml":"在常见UML用例图中，用椭圆表示的是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"演员/参与者","html":"<p>演员/参与者</p>"},{"key":"B","text":"类","html":"<p>类</p>"},{"key":"C","text":"数据存储","html":"<p>数据存储</p>"},{"key":"D","text":"用例","html":"<p>用例</p>"}],"answer":"D","answerText":"D 用例","explanation":"参与者常用小人表示；符号细节为通行UML记法。","explanationHtml":"<p>参与者常用小人表示；符号细节为通行UML记法。</p>","important":false},{"id":"se-q31","number":31,"type":"choice","chapter":"单选题 · 加练题库","title":"在常见数据流图中，带箭头的连线通常表示（ ）。","titleHtml":"在常见数据流图中，带箭头的连线通常表示（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"程序调用","html":"<p>程序调用</p>"},{"key":"B","text":"继承关系","html":"<p>继承关系</p>"},{"key":"C","text":"数据流","html":"<p>数据流</p>"},{"key":"D","text":"物理设备","html":"<p>物理设备</p>"}],"answer":"C","answerText":"C 数据流","explanation":"区分数据流图与模块结构图。","explanationHtml":"<p>区分数据流图与模块结构图。</p>","important":false},{"id":"se-q32","number":32,"type":"choice","chapter":"单选题 · 加练题库","title":"下列哪一项不属于提纲列举的需求分析阶段常用分析工具？","titleHtml":"下列哪一项<strong>不属于</strong>提纲列举的需求分析阶段常用分析工具？","stem":"","stemHtml":"","options":[{"key":"A","text":"数据字典","html":"<p>数据字典</p>"},{"key":"B","text":"ER图","html":"<p>ER图</p>"},{"key":"C","text":"状态转换图","html":"<p>状态转换图</p>"},{"key":"D","text":"甘特图","html":"<p>甘特图</p>"}],"answer":"D","answerText":"D 甘特图","explanation":"甘特图侧重进度计划。","explanationHtml":"<p>甘特图侧重进度计划。</p>","important":false},{"id":"se-q33","number":33,"type":"choice","chapter":"单选题 · 加练题库","title":"需求分析的描述形式主要有（ ）。","titleHtml":"需求分析的描述形式主要有（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"文字、图形、表格","html":"<p>文字、图形、表格</p>"},{"key":"B","text":"声音、视频、动画","html":"<p>声音、视频、动画</p>"},{"key":"C","text":"数据库、网络、硬件","html":"<p>数据库、网络、硬件</p>"},{"key":"D","text":"开发、测试、部署","html":"<p>开发、测试、部署</p>"}],"answer":"A","answerText":"A 文字、图形、表格","explanation":"记住文字、图形、表格三种形式。","explanationHtml":"<p>记住文字、图形、表格三种形式。</p>","important":false},{"id":"se-q34","number":34,"type":"choice","chapter":"单选题 · 加练题库","title":"下列哪一组是软件结构设计的基本原理？","titleHtml":"下列哪一组是软件结构设计的基本原理？","stem":"","stemHtml":"","options":[{"key":"A","text":"可行性、经济性、社会性、风险","html":"<p>可行性、经济性、社会性、风险</p>"},{"key":"B","text":"信息隐蔽、模块化、抽象、信息传递","html":"<p>信息隐蔽、模块化、抽象、信息传递</p>"},{"key":"C","text":"编译、连接、执行、调试","html":"<p>编译、连接、执行、调试</p>"},{"key":"D","text":"安全、效率、美观、低成本","html":"<p>安全、效率、美观、低成本</p>"}],"answer":"B","answerText":"B 信息隐蔽、模块化、抽象、信息传递","explanation":"与软件工程三要素区别开。","explanationHtml":"<p>与软件工程三要素区别开。</p>","important":false},{"id":"se-q35","number":35,"type":"choice","chapter":"单选题 · 加练题库","title":"需求分析首先需要从用户端弄清楚（ ）。","titleHtml":"需求分析首先需要从用户端弄清楚（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"开发工具有多先进","html":"<p>开发工具有多先进</p>"},{"key":"B","text":"软件代码怎样编写","html":"<p>软件代码怎样编写</p>"},{"key":"C","text":"软件应该做什么","html":"<p>软件应该做什么</p>"},{"key":"D","text":"服务器放在哪里","html":"<p>服务器放在哪里</p>"}],"answer":"C","answerText":"C 软件应该做什么","explanation":"需求分析强调“做什么”，设计阶段进一步考虑“怎么做”。","explanationHtml":"<p>需求分析强调“做什么”，设计阶段进一步考虑“怎么做”。</p>","important":false},{"id":"se-q36","number":36,"type":"choice","chapter":"单选题 · 加练题库","title":"在提纲中，主要呈现自上而下层次结构的是（ ）。","titleHtml":"在提纲中，主要呈现自上而下层次结构的是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"层次图","html":"<p>层次图</p>"},{"key":"B","text":"结构图","html":"<p>结构图</p>"},{"key":"C","text":"ER图","html":"<p>ER图</p>"},{"key":"D","text":"甘特图","html":"<p>甘特图</p>"}],"answer":"A","answerText":"A 层次图","explanation":"与结构图的调用关系考点互补。","explanationHtml":"<p>与结构图的调用关系考点互补。</p>","important":false},{"id":"se-q37","number":37,"type":"choice","chapter":"单选题 · 加练题库","title":"根据提纲所列的内聚类型，内聚性最弱的是（ ）。","titleHtml":"根据提纲所列的内聚类型，内聚性最弱的是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"通信内聚","html":"<p>通信内聚</p>"},{"key":"B","text":"功能内聚","html":"<p>功能内聚</p>"},{"key":"C","text":"顺序内聚","html":"<p>顺序内聚</p>"},{"key":"D","text":"偶然内聚","html":"<p>偶然内聚</p>"}],"answer":"D","answerText":"D 偶然内聚","explanation":"偶然内聚最弱、功能内聚最强。","explanationHtml":"<p>偶然内聚最弱、功能内聚最强。</p>","important":false},{"id":"se-q38","number":38,"type":"choice","chapter":"单选题 · 加练题库","title":"在提纲列出的四种耦合类型中，按常见教材，耦合最弱的是（ ）。","titleHtml":"在提纲列出的四种耦合类型中，按常见教材，耦合最弱的是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"控制耦合","html":"<p>控制耦合</p>"},{"key":"B","text":"数据耦合","html":"<p>数据耦合</p>"},{"key":"C","text":"内容耦合","html":"<p>内容耦合</p>"},{"key":"D","text":"公共环境耦合","html":"<p>公共环境耦合</p>"}],"answer":"B","answerText":"B 数据耦合","explanation":"按通常排序“数据＜控制＜公共环境＜内容”；注意提纲方向疑点。","explanationHtml":"<p>按通常排序“数据＜控制＜公共环境＜内容”；注意提纲方向疑点。</p>","important":true},{"id":"se-q39","number":39,"type":"choice","chapter":"单选题 · 加练题库","title":"根据提纲，软件开发计划一般采用（ ）。","titleHtml":"根据提纲，软件开发计划一般采用（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"三三制原则","html":"<p>三三制原则</p>"},{"key":"B","text":"先进先出原则","html":"<p>先进先出原则</p>"},{"key":"C","text":"二八定律原则","html":"<p>二八定律原则</p>"},{"key":"D","text":"单一职责原则","html":"<p>单一职责原则</p>"}],"answer":"C","answerText":"C 二八定律原则","explanation":"提纲只给出“二八定律原则”名称，未阐述具体应用。","explanationHtml":"<p>提纲只给出“二八定律原则”名称，未阐述具体应用。</p>","important":false},{"id":"se-q40","number":40,"type":"choice","chapter":"单选题 · 加练题库","title":"数据库的物理设计在本提纲中对应（ ）。","titleHtml":"数据库的物理设计在本提纲中对应（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"详细设计阶段","html":"<p>详细设计阶段</p>"},{"key":"B","text":"需求分析阶段","html":"<p>需求分析阶段</p>"},{"key":"C","text":"运行维护阶段","html":"<p>运行维护阶段</p>"},{"key":"D","text":"可行性研究阶段","html":"<p>可行性研究阶段</p>"}],"answer":"A","answerText":"A 详细设计阶段","explanation":"与选择题25相互印证。","explanationHtml":"<p>与选择题25相互印证。</p>","important":false},{"id":"se-q41","number":41,"type":"choice","chapter":"单选题 · 加练题库","title":"（补充）通常按顺序推进阶段、强调阶段文档的过程模型是（ ）。","titleHtml":"（补充）通常按顺序推进阶段、强调阶段文档的过程模型是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"增量模型","html":"<p>增量模型</p>"},{"key":"B","text":"快速原型模型","html":"<p>快速原型模型</p>"},{"key":"C","text":"螺旋模型","html":"<p>螺旋模型</p>"},{"key":"D","text":"瀑布模型","html":"<p>瀑布模型</p>"}],"answer":"D","answerText":"D 瀑布模型","explanation":"提纲只点名模型，此定义来自通行教材。","explanationHtml":"<p>提纲只点名模型，此定义来自通行教材。</p>","important":false},{"id":"se-q42","number":42,"type":"choice","chapter":"单选题 · 加练题库","title":"（补充）通过尽早制作原型并收集用户反馈来澄清需求的模型是（ ）。","titleHtml":"（补充）通过尽早制作原型并收集用户反馈来澄清需求的模型是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"瀑布模型","html":"<p>瀑布模型</p>"},{"key":"B","text":"快速原型模型","html":"<p>快速原型模型</p>"},{"key":"C","text":"增量模型","html":"<p>增量模型</p>"},{"key":"D","text":"V模型","html":"<p>V模型</p>"}],"answer":"B","answerText":"B 快速原型模型","explanation":"关键词：原型、反馈、澄清需求。","explanationHtml":"<p>关键词：原型、反馈、澄清需求。</p>","important":false},{"id":"se-q43","number":43,"type":"choice","chapter":"单选题 · 加练题库","title":"（补充）把系统分成可逐步交付的若干增量的模型是（ ）。","titleHtml":"（补充）把系统分成可逐步交付的若干增量的模型是（ ）。","stem":"","stemHtml":"","options":[{"key":"A","text":"增量模型","html":"<p>增量模型</p>"},{"key":"B","text":"瀑布模型","html":"<p>瀑布模型</p>"},{"key":"C","text":"单次大爆炸模型","html":"<p>单次大爆炸模型</p>"},{"key":"D","text":"形式化模型","html":"<p>形式化模型</p>"}],"answer":"A","answerText":"A 增量模型","explanation":"关键词：分批开发、逐步交付。","explanationHtml":"<p>关键词：分批开发、逐步交付。</p>","important":false},{"id":"se-q44","number":44,"type":"choice","chapter":"单选题 · 加练题库","title":"下列哪一项不是提纲所列的软件危机解决途径？","titleHtml":"下列哪一项<strong>不是</strong>提纲所列的软件危机解决途径？","stem":"","stemHtml":"","options":[{"key":"A","text":"改善开发技术与方法","html":"<p>改善开发技术与方法</p>"},{"key":"B","text":"采用好的开发工具","html":"<p>采用好的开发工具</p>"},{"key":"C","text":"加强组织和管理","html":"<p>加强组织和管理</p>"},{"key":"D","text":"取消开发过程中的组织管理","html":"<p>取消开发过程中的组织管理</p>"}],"answer":"D","answerText":"D 取消开发过程中的组织管理","explanation":"解决软件危机需要技术、工具和管理。","explanationHtml":"<p>解决软件危机需要技术、工具和管理。</p>","important":false},{"id":"se-q45","number":45,"type":"choice","chapter":"单选题 · 加练题库","title":"面向对象方法在本提纲中强调以（ ）为核心。","titleHtml":"面向对象方法在本提纲中强调以（ ）为核心。","stem":"","stemHtml":"","options":[{"key":"A","text":"项目进度","html":"<p>项目进度</p>"},{"key":"B","text":"数据","html":"<p>数据</p>"},{"key":"C","text":"硬件","html":"<p>硬件</p>"},{"key":"D","text":"测试用例","html":"<p>测试用例</p>"}],"answer":"B","answerText":"B 数据","explanation":"提纲第19条：数据与处理相结合，以数据为核心。","explanationHtml":"<p>提纲第19条：数据与处理相结合，以数据为核心。</p>","important":false},{"id":"se-t11","number":11,"type":"judge","chapter":"判断题 · 加练题库","title":"软件工程只研究软件开发，不涉及软件维护。","titleHtml":"软件工程只研究软件开发，不涉及软件维护。","stem":"","stemHtml":"","options":[],"answer":"×","answerText":"×","explanation":"定义中明确包括开发和维护。","explanationHtml":"<p>定义中明确包括开发和维护。</p>","important":false},{"id":"se-t12","number":12,"type":"judge","chapter":"判断题 · 加练题库","title":"《用户需求报告》面向开发者，其主要内容是业务模型、功能模型和接口模型。","titleHtml":"《用户需求报告》面向开发者，其主要内容是业务模型、功能模型和接口模型。","stem":"","stemHtml":"","options":[],"answer":"×","answerText":"×","explanation":"这是两份需求文档的对象和内容混淆：用户报告面向用户。","explanationHtml":"<p>这是两份需求文档的对象和内容混淆：用户报告面向用户。</p>","important":false},{"id":"se-t13","number":13,"type":"judge","chapter":"判断题 · 加练题库","title":"需求分析文档评审包括一致性、完整性、现实性和有效性。","titleHtml":"需求分析文档评审包括一致性、完整性、现实性和有效性。","stem":"","stemHtml":"","options":[],"answer":"√","answerText":"√","explanation":"提纲第17条。","explanationHtml":"<p>提纲第17条。</p>","important":false},{"id":"se-t14","number":14,"type":"judge","chapter":"判断题 · 加练题库","title":"结构图主要用于表示各模块之间的调用关系。","titleHtml":"结构图主要用于表示各模块之间的调用关系。","stem":"","stemHtml":"","options":[],"answer":"√","answerText":"√","explanation":"层次图则侧重自上而下的层次结构。","explanationHtml":"<p>层次图则侧重自上而下的层次结构。</p>","important":false},{"id":"se-t15","number":15,"type":"judge","chapter":"判断题 · 加练题库","title":"ER图用于描述数据对象以及数据对象之间的联系。","titleHtml":"ER图用于描述数据对象以及数据对象之间的联系。","stem":"","stemHtml":"","options":[],"answer":"√","answerText":"√","explanation":"提纲第27条。","explanationHtml":"<p>提纲第27条。</p>","important":false},{"id":"se-t16","number":16,"type":"judge","chapter":"判断题 · 加练题库","title":"软件结构设计基本原理包括信息隐蔽、模块化、抽象和信息传递。","titleHtml":"软件结构设计基本原理包括信息隐蔽、模块化、抽象和信息传递。","stem":"","stemHtml":"","options":[],"answer":"√","answerText":"√","explanation":"提纲第23条。","explanationHtml":"<p>提纲第23条。</p>","important":false},{"id":"se-t17","number":17,"type":"judge","chapter":"判断题 · 加练题库","title":"按照通行教材的四类耦合强弱排序，数据耦合比内容耦合更强。","titleHtml":"按照通行教材的四类耦合强弱排序，数据耦合比内容耦合更强。","stem":"","stemHtml":"","options":[],"answer":"×","answerText":"×","explanation":"通常数据耦合更弱、内容耦合更强；提纲存在方向性笔误疑点。","explanationHtml":"<p>通常数据耦合更弱、内容耦合更强；提纲存在方向性笔误疑点。</p>","important":true},{"id":"se-t18","number":18,"type":"judge","chapter":"判断题 · 加练题库","title":"通过引入中间实体（第三者插足），可以处理多对多实体联系。","titleHtml":"通过引入中间实体（第三者插足），可以处理多对多实体联系。","stem":"","stemHtml":"","options":[],"answer":"√","answerText":"√","explanation":"这是对第9条术语的常见数据库设计解释。","explanationHtml":"<p>这是对第9条术语的常见数据库设计解释。</p>","important":false},{"id":"se-t19","number":19,"type":"judge","chapter":"判断题 · 加练题库","title":"（补充）增量模型要求首次交付就必须包含全部系统功能。","titleHtml":"（补充）增量模型要求首次交付就必须包含全部系统功能。","stem":"","stemHtml":"","options":[],"answer":"×","answerText":"×","explanation":"增量模型强调按增量逐步交付。提纲只点名模型，解释来自通行教材。","explanationHtml":"<p>增量模型强调按增量逐步交付。提纲只点名模型，解释来自通行教材。</p>","important":false},{"id":"se-t20","number":20,"type":"judge","chapter":"判断题 · 加练题库","title":"（补充）快速原型模型可以通过用户反馈帮助澄清不明确的需求。","titleHtml":"（补充）快速原型模型可以通过用户反馈帮助澄清不明确的需求。","stem":"","stemHtml":"","options":[],"answer":"√","answerText":"√","explanation":"关键词是“先做原型，再获取反馈”。","explanationHtml":"<p>关键词是“先做原型，再获取反馈”。</p>","important":false}],"notesHtml":"<blockquote>题目根据复习提纲推测，不是老师原题或命中保证；补充内容与方向疑点已保留，请以课堂材料为准。</blockquote>\n<h3>一、出题方向与复习优先级</h3>\n<div class=\"table-scroll\"><table><thead><tr><th>优先级</th><th>预测考点</th><th>对应提纲</th><th>建议重点题型</th></tr></thead><tbody>\n<tr><td>★★★★★</td><td>需求分析：输入输出、双文档、里程碑、评审</td><td>5、6、7、17、25、26</td><td>简答＋选择＋判断</td></tr>\n<tr><td>★★★★★</td><td>软件工程、软件危机、三要素及解决办法</td><td>4、12、13、28</td><td>简答＋选择</td></tr>\n<tr><td>★★★★★</td><td>软件结构设计、模块化、高内聚低耦合</td><td>11、16、23、28</td><td>简答＋选择＋判断</td></tr>\n<tr><td>★★★★★</td><td>瀑布、快速原型、增量模型</td><td>28（仅列名称）</td><td>简答或比较题（需参考课堂材料）</td></tr>\n<tr><td>★★★★☆</td><td>软件生命周期与阶段划分</td><td>8</td><td>简答＋选择＋判断</td></tr>\n<tr><td>★★★★☆</td><td>可行性研究的地位及四方面</td><td>2、18、28</td><td>简答＋选择＋判断</td></tr>\n<tr><td>★★★★☆</td><td>概要设计的输入、输出、方法、图形工具</td><td>10、11、15</td><td>选择＋简答</td></tr>\n<tr><td>★★★★☆</td><td>面向对象的三模型与三类关系</td><td>19、21、22</td><td>选择＋简答</td></tr>\n<tr><td>★★★★☆</td><td>数据库设计阶段与ER图</td><td>9、20、24、27</td><td>选择＋判断＋识图</td></tr>\n<tr><td>★★★☆☆</td><td>进度图、二八定律、具体图形记号</td><td>3、14、20</td><td>选择＋判断</td></tr>\n</tbody></table></div>\n<p><strong>判断预测优先级的方法</strong>：提纲中反复出现的主题，以及第28条末尾再度点名的概念，优先考虑；仅出现一次的事实性考点更适合选择/判断。此优先级为学习建议，不是概率统计。</p>\n<h3>八、图形题速记（ER图、用例图、数据流图）</h3>\n<blockquote>提纲第20条仅写出“ER图图标、用例图图标、数据流图图标”，没有附对应图例。以下为通行的常见记法，<strong>属于补充知识</strong>；具体形状若与课堂PPT不同，以课堂PPT为准。</blockquote>\n<div class=\"table-scroll\"><table><thead><tr><th>图</th><th>常见符号/元素</th><th>作用与识别点</th></tr></thead><tbody>\n<tr><td>ER图</td><td>矩形＝实体；菱形＝联系；椭圆＝属性</td><td>描述数据对象及对象间的联系</td></tr>\n<tr><td>UML用例图</td><td>小人＝参与者（Actor）；椭圆＝用例；矩形框＝系统边界（常见）</td><td>描述参与者与系统功能之间的关系</td></tr>\n<tr><td>数据流图（DFD）</td><td>箭头＝数据流；圆形/圆角图形＝加工；矩形＝外部实体；双平行线/开口矩形＝数据存储（符号因记法而异）</td><td>描述数据如何在加工、数据存储和外部实体间流动</td></tr>\n<tr><td>层次图</td><td>自上而下分层排列</td><td>展示层次结构，提纲第11条</td></tr>\n<tr><td>结构图</td><td>表示模块及模块间的调用关系</td><td>不要与数据流图混淆</td></tr>\n</tbody></table></div>\n<h3>九、考前易错点与原始提纲的表述疑点</h3>\n<ol>\n<li><strong>耦合排序的方向性疑点（重点）</strong>：原提纲第16条写“耦合度由高到第：数据耦合—控制耦合—公共环境耦合—内容耦合”。其中“第”应疑似“低”，但更重要的是<strong>排序方向与通行教材相反</strong>。常见教材中，这四类通常是<strong>由低到高：数据→控制→公共环境→内容</strong>。本文依照通行教材设置相关题目，并明确作了提示；如老师课堂有特定划分，优先核对课堂答案。</li>\n<li><strong>需求文档两个名称易混</strong>：提纲交替使用“需求分析规格说明书”和“需求规格说明书”，正文依据原提纲分别保留；它们在相关题目中指需求分析阶段的规格说明文档，不应误选“概要设计说明书”。</li>\n<li><strong>模型定义在原提纲中缺失</strong>：瀑布、快速原型、增量只在第28条出现，没有具体内容。S6、题41—43、判断19—20是根据常见教材补写，不能当成原提纲逐字答案。</li>\n<li><strong>图形符号在原提纲中缺失</strong>：第20条没有附图，识图题内容按通用符号准备，并与老师课件对照。</li>\n<li><strong>“二八定律”缺乏解释</strong>：第3条只说软件开发计划一般采用二八定律原则，没有具体说明哪个“20%”和哪个“80%”，不要自行认定题目会问某一种特定比例解释。</li>\n<li><strong>第14条有明显文字疑点</strong>：“能够气息表示任务并行关系”可能是“能够清晰表示……”。应重点记住提纲点名的两种工具——甘特图、工程网络图。</li>\n<li><strong>阶段划分以本课程提纲为准</strong>：尤其把“需求分析”列为“计划阶段”、数据库概念/逻辑/物理设计对应需求分析/概要设计/详细设计，考试遇到匹配题按本提纲作答。</li>\n</ol>\n<h3>十、最后冲刺：一页速背清单</h3>\n<div class=\"table-scroll\"><table><thead><tr><th>考点</th><th>一句话答案</th></tr></thead><tbody>\n<tr><td>软件组成</td><td>程序＋数据＋文档</td></tr>\n<tr><td>软件工程</td><td>指导软件开发与维护的学科</td></tr>\n<tr><td>软件工程三要素</td><td>过程＋方法＋工具</td></tr>\n<tr><td>软件危机解决</td><td>技术方法＋开发工具＋组织管理</td></tr>\n<tr><td>可行性研究</td><td>立项前提；技术＋经济＋社会＋软件开发风险</td></tr>\n<tr><td>需求分析输入/输出</td><td>可行性分析报告 → 用户需求报告＋需求分析规格说明书</td></tr>\n<tr><td>需求分析的两大类需求</td><td>功能性＋非功能性</td></tr>\n<tr><td>两份需求报告</td><td>面向用户：环境/流程/功能；面向开发：业务/功能/接口模型</td></tr>\n<tr><td>需求文档评审</td><td>一致性＋完整性＋现实性＋有效性</td></tr>\n<tr><td>生命周期</td><td>计划（可研、需求）→开发（概设、详设、编码、测试）→运行维护</td></tr>\n<tr><td>概要设计</td><td>输入需求规格说明书；输出概要设计说明书</td></tr>\n<tr><td>概要设计方法</td><td>面向数据流设计＋面向数据结构设计</td></tr>\n<tr><td>层次图与结构图</td><td>层次图：上下层次；结构图：模块调用</td></tr>\n<tr><td>模块化原则</td><td>高内聚＋低耦合</td></tr>\n<tr><td>内聚由弱到强</td><td>偶然→逻辑→时间→通信→顺序→功能</td></tr>\n<tr><td>耦合由弱到强（通行教材）</td><td>数据→控制→公共环境→内容（原提纲方向存疑）</td></tr>\n<tr><td>结构设计四原理</td><td>信息隐蔽＋模块化＋抽象＋信息传递</td></tr>\n<tr><td>面向对象三模型</td><td>对象＋动态＋功能</td></tr>\n<tr><td>类之间三关系</td><td>关联＋整体部分＋一般特殊</td></tr>\n<tr><td>数据库三设计阶段</td><td>概念/需求＋逻辑/概要＋物理/详细</td></tr>\n<tr><td>多对多实体关系</td><td>第三者插足模式（中间实体/表）</td></tr>\n<tr><td>需求分析工具</td><td>数据流图＋IPO图＋状态转换图＋数据字典＋ER图</td></tr>\n<tr><td>三种过程模型（通行教材补充）</td><td>瀑布：顺序阶段；快速原型：反馈澄清；增量：分批交付</td></tr>\n<tr><td>软件开发进度图</td><td>甘特图＋工程网络图</td></tr>\n<tr><td>软件开发计划原则</td><td>二八定律原则（按提纲原文）</td></tr>\n</tbody></table></div>\n<p><strong>建议刷题顺序</strong>：S1—S5 → 选择01—25 → 判断01—10 → S6（过程模型）→ 加练题 → 图形记号。复习时先遮住答案作答，再用解析纠错；简答题尽量练习用关键词分点书写。</p>\n<hr>\n<p><em>整理依据：用户上传的《软件工程》期中复习提纲。提纲未给出、但为识图或过程模型题所需的知识，已标注“通行教材补充”，未伪装为原文。</em></p>"}]}