JAVA大学期末考试真题(带答案)

1.Which is the basic unit of a java program?(B )

  1. Java方法          B、Java类
  2. Java变量          D、以上都是

2.Let null be the value of a variable a,please select the possible type of (B )

  1. Integer            B、String
  2. System            D、都有可能

3.Which of the following class is correct?( D

  1. public class Bean{}
  2. public class Circle{

     double r;

     r==0.0;

     }

  1. public class Point{

     public point(){}

     }

  1. 都正确

4.Given Word w=new Word(“Java”).Please select the proper constructor( C

  1. public word(){}            B、public word(String w){}
  2. public Word(String w){}     D、public void Word(String W){}

5.Which of the following privilege has the

  1. 私有访问权限 private          B、默认访问权限default
  2. 受保护的访问权限   protected     D、公共访问权限public

6.Let int[] data={3,8,12,6},the value of data[2] is (C )

  A、3            B、8            C、12            D、6

7.Given Person p=new Student().We can conclude that( D

  1. Person类的父亲是Object类
  2. Student类的父亲是Object类
  3. Student类是Person类的直接子类或者间接子类
  4. 都正确

8.Which of the following option is correct?(B )

  1. int[] data=new int[0];
  2. String[] lines=new String[5];
  3. String[] person={};
  4. 都正确

9.Please select a proper class with belongs to the package java.lang( D

  1. System          B、Object          C、Integer          D、都属于

10.Let Paper be a class extending from Document and d be a variable of type Document,when running Paper paper=(Paper)d,the possible exception may be thrown is(B )B

  1. NullPointerException              B、ClassCastException
  2. IOException                     D、都有可能

  1. How many new objects are constructed when running String[] persons=new String[3]?( A

  A、1            B、2            C、3            D、4

12.The keyword declaring a subclass is (CC

  1. Object                       B、public

C. extends                       D、implements

13. Given the following program. The correct statement is ( D

Public class Address{

Private String city;

Private String zipcode;

Public Address(String zip){}

}

A、Address addr = new this();               BAddress addr = new Address();

C、Address addr = new this(“210000”);        DAddress addr = new Address(“210000”);

14.Consider the following program, which is correct?D

 Public class Test{

Public static void main(String[] args){

String name;

String hello = “Hello,” + name;

System.out.println(hello);

}

}

A、程序运行输出结果为Hello     B、程序运行结果为Hello, null

C、程序运行产生空指针异常      D、程序存在语法错误无法运行

15.Given Document doc = new News( ).We can conclude the option( ) must be wrong(A

A、 New d = doc;                B、New d = (News)doc;

C、Document d = doc;             D、Document d = (News)doc;

16.在Paper类中覆盖equals方法的正确形式是( C

A、public boolean equals()               B、public Boolean

C、public Boolean equals(paper obj)        D、都正确

17.The parent class of FileNotFoundExceptions is (B )

  1. Exception                      B、IOException

C、RuntimeException               D、ClassNotFoundException

18.Let Person be a java class and variables a and b be of type Person. Which option is syntactically(语法上) invalid in any case?(D )

A、Boolean ok = a==b                    B、boolean ok = a.equals(b);

C、boolean ok = a instance of Person;       D、boolean ok = a>b;

19.Which of the following statement is true?(A )

A、static variable are shared by all the instances of the class.

B、static methods are tied to a specific object.

C、static constants are final variables and tied to a specific object

D、The static modifier can only be used to declare static variables.

  1. 运行下面程序最可能的输出的结果是( D

Import java.util;

Public class Test{

   Public static void main(String[] args){

      ArrayList list = new ArrayList();

      list.add(“John”);

      list.add(3);

      list.add(null);

      list.add(null);

      System.out.println(list);

}

}

A、0x38dd             B[John,3]

C、[John,3,null]         D[John,3,null,null]

21.Whcih is the basic environment for developing java program?(C )

A、Eclipse      B、NetBeans      C、JDK      D、JRE

22.boolean is a wrapper class declared in the package( B

A、java.io       B、java.lang

C、java.net      D、java.util

23.Which class is used to read a text file?( D

A、Reader   B、FileReader   C、InputStream   D、FileInputStream

24.Let variable a be a member of class Point, the possible type( D

A、int    B、double    C、Point    D、Any of the above

25.Which the following method is correct?C )

A public void next(){return null;}

B、public int next(){return null;}

Cpublic int[] next(){return null;}

Dpublic int[] next(){return {2,3};}  

26.Given int a=b.length .Please select a proper type for b.( C

A、String      B、int      C、int[]      D、Integer

27.Given Person as follows.Please add a constructor from the following option( D

Public class Person{

Private int age;

Private String name;

Public Person(int age, String name){}

}

A、Public Person(){this();}

B、Public Person(int age){this(age);}

C、Public Person(String name){this(name);}

D、Public Person(Person copy){this(copy.age,,copy.name);}

28.Considering the following code, which is correct?( C

Public class Person{

Static int[] arr = new int[5];

Public static void main(String[] args){System.out.println(arr[0]);}

}

A、Cannot be compiled        B、Can be compiled but cannot run

C、Output 0                 D、Output null

29.Given the program as follows.How many properties have a Student object?(D )

Class Person{

Private int age;

Private String name;

}

Class Student extends Person{

Private String school;

}

A、0            B、1            C、2            D、3

30.FileInputStream is a class declare in java.io.Please select a proper constructor for it.(C )

A、Public FileInputStream(String file)

B、Public FileInputStream(String file)throws Exception

C、Public FileInputStream(String file)throws IOException

D、Public FileInputStream(String file)throws FileNotFoundException

31.Given Person[] persons = this.friends(). We can conclude the proper form of friends must beD )

A、void friends()            B、String friends()

C、Person friends()          D、Person[] friends()

  1. Which of the following statement is wrong in any case?( B
  1. return this                  B、return this();
  2. return this.age;              D、return this.toString();

33.Given Student extends Person{}. The person class of Student is( B

A、Object        B、Person        C、Student        D、Nothing

34.(Continue with 33)By declare Student a = b; the type of variable b must beC

A、Object        BPerson        CStudent        D.Any of the above

35.Given Report as follows. Please select a valid return statement for makeInfoA

Public class Report{

Private String title = “Unknown”

Private static String makeInfo(){         ;}

}静态方法不能对非静态变量进行引用

A、return new Report().title   Breturn title    Creturn this.title     D都正确

36.Given String[] persons = {“Hello”, “World”}. Which statement is correct?(AB)

A、persons = new String[10];        B、persons[0] = “John”;

C、persons[2] = “Marry”;             D、都正确

37.Which is wrong about Java class?(C )

A、each Java class contains toString() methond

B、each Java class is a direct or indirect subclass of Object

C、each Java class could act as a superclass to derive subclass

D、each Java class is a date type

38.Given a statement n = new News(), where News is a subclass of Document.We can conclude that the type of n is( D

A、Object        B、Document        C、News        D、都可能

39. Given a statement Document doc = new Paper().where Document is an abstract class. Wecan conclude that( A

A、Paper must be a concrete class

B、Paper must be the direct subclass of Document

C、The statement Paper obj = new Paper() must be invalid

D、The statement Object obj = new Paper() must be invalid

40.Please select a correct option(D )

A、Exception e = new Exception();              

B、Object obj = new NullPointerException();

C、RuntimeException e = new RuntimeException();

D、都正确

辨析题

YES1.Java程序只有8种简单的数据类型,java.lang包含为每种简单数据类型申明了一个对应的引用数据类型,我们把这些引用数据类型称为封装类。

NO2.根据语句 Point p = new Point);可知Point类至少显式申明了一个构造方法。

YES3.使用BuferedReader可以用一行字符串一行字符串的方式读取输入内容。

YES4. URL类是java.net包内中明的预定义类,我们可以用它来读取网络中HTML页面文件

的内容。

NO5.根据语句Record[] data = new Record[10];可以断定Record一定是具体类。在java.lang里面的抽象类

YES6.任何一个Java类都至少有一个构造方法。

NO7.由Exception维承的任何自定义类都属于告运行时异常。

YES8.开发Java程序的 般过程是先编写源程序,保存在后级名为java的文件中,然后编译源程序,检查程序语法上是否正确,并翻译成后缀名为class的字节码文件,最后加载、

解释执行字节码文件。

NO9.根据中明public abstract class Circle extend Shape{}可知Shape类一定是抽象类。

YES10.己知a, b均为Point类型的变量并且a.equals(b)的值为true.那么我们可以判断Point类一定覆盖了equals方法。

二、请改正下面程序中的语法错误。(共2小题,每题3分,共计6分)

1、 public class NamedBean{

int id;

String name;

public NamedBean(String name){

this(1,name);

}

public NameBean(int id,String name){

this.id = id;

this.name = name;}

}

2、 class MoneyException extends Exception{}

class Money {

public static int parse(String txt)throws MoneyException {return 0;}

}

class Test{

public static void main(String[] args) throws MoneyException{

String txt=”三万八千元”

System.out.println(Money.parse(txt));

}

}

3、 abstract class Human{

String name = “Unknown”;

public Human(String name)

{

this.name = name;

}

}

class Boy extends Human{

public Boy(String name){

super(name);

}

}

4、 import java.io.*;

class Test{

public static void main(String[] args) throws IOException {

FileReader reader = new FileReader(“sample.txt”);

int c = reader.read();

while(c != -1){

System.out,println((char)c);

C = reader.read();

}

Reader.close();

}

}

程序分析题(共8小题,每题5分,共计40分)

Reading Program One and then answer questions 1-3

  1. What is the out put when running this program?

Product:iPhone Price:1000.0元

  1. Please present the members declared in class Product , including constructors.

price,name,Product(String n),getinfo()

  1. Please illustrate the detailed process of constructing the Product object. 请说明构建Product对象的详细过程。

检测类是否被加载(常量池)

在堆上为对象分配内存

为分配的内存空间初始化零值:

对对象设置hashcode、所属的类

执行 init 方法

Reading Program Two and then answer questions 4-6

  1. What is the output when running the program?

(10,10)

  1. Please point out the application of method override. 请指出方法重写的应用。

当子类需要父类的功能,而功能的主体子类还有自己特有的内容时,可以重写父类中的方法,这样,即沿袭了父类的功能,又定义了子类自己特有的内容。

  1. Polymorphism is one of the important characters of object-oriented programming . Please point out how the program applies the character. 多态性是面向对象编程的重要特征之一。请指出程序如何应用该特征。

向下转型,将父类对象的引用强转成子类类型,使用子类特有的方法。大大提高程序的可拓展性。

Reading Program Three and then answer questions 7-8

  1. What is the output when running the program?

南京

扬州

镇江的周边城市有:南京扬州

  1. 当main方法执行完第5条语句后,请画出此时内存中程序运行的栈堆结构状态并做简要说明.

Program one

public class Product{

private double price = 1000;

private String name = “UNKNOWN”;

public Product (String n){ name = n;}

public String getinfo(){ return = “Product:” + name + “\tPrice:” + price + “元”;}

}

class Test{

Product p = new Product(“iPhone”);

System.out.println(p.getinfo());

}

Program two

class Point{

protected int x,y;

public Point(int x, int y){ this.x = x;this.y = y;}

public String getinfo(){ return “(“ + x + “,” + y + “)”;}

}

class Point3D extends Point{

private int z;

public Point3D(int x,int y,int z){

super(x,y);   this.z = z;

}

public String getinfo(){return “(“ + x + “,” + y + “,” + z + “)”;}

}

class Test{

public static void main(String[] args){

Point p1 = new Point(10,10);

System.out.println(p1.getinfo());

}

Program Three

class City{

private String name;

private City[] neighbours = {};

public City(String name){ this.name = name;}

public void addNeighbour(City city){

int len = neighbours.length;

City[] temp = new City[len + 1];

for(int i = 0;i < len;i++) temp[i] = neighbours[i];

temp[len] = city;

neighbours = temp;

}

public String toString(){

if(neighbours.length == 0) return name;

String info = name + “的周边城市有:”;

for(){

info += neighbours[i].name;

}

return info;

}

}

public class Test{

public static void main(String[] args){

City c1 = new City(“南京”);

City c2 = new City(“扬州”);

City c3 = new City(“镇江”);

c3.addNeighbour(c1);

c3.addNeighbour(c2);

System.out.println(c1);

System.out.println(c2);

System.out.println(c3);

}

}

Reading Program One and then answer questions 1-3

  1. What is the output when running the program?
  2. Please present the members declared in class Node,including constructors.
  3. Please illustrate the detailed process of constructing the Node object.

Reading Program Two and then answer questions 4-6

  1. What is the output when running the program?

2012-4-22

2012-4-10

    2012-4-10

  1. Please in terms of the program explain the main usage of the keyword this.

This()指向本类相应的构造方法,this.”为指向本对象中的成员变量

  1. 请使用方法调用栈详细说明date2.setDay(10)语句的执行过程
  1. 把形参10压入栈中
  2. 调用方法setDay,把this.day压入栈中,引用堆中对象date2中的day变量
  3. 通过this.day把对象中的day重新赋值为10
  4. 依次释放栈中的this.day和setDay

Reading Program Three and then answer questions 7-8

  1. What is the output when running the program?

id:100

Bean:Java Programming id:200

Bean:Java Programming id:300

Bean:Java Programming id:300

  1. Polymorphism is one of the important characters of object-oriented programming point out how the program applies the character.

向下转型,将父类对象的引用强转成子类类型,使用子类特有的方法。大大提高程序的可拓展性。

Program one

public class Node{

private int id;

private String label = “UNKNOWN”;

public Node(String label){this.label = label;}

public String getinfo(){ return “Node:” + id + “\tLabel:” + label;}

}

Program two

class MyDate{

private int day;

private int month;

private int year;

public MyDate() {this(1,1,1960);}

public MyDate(int d,int m,int y){day = d;month = m;year = y;}

public void setDay(int day){this.day = day}

public String getinfo(){return year + “-“ + month + “-“ day;}

}

public class Test{

public static void main(String[] args){

MyDate date1 = new MyDate(22,4,2012);

System.out.println(date1.getinfo());

MyDate date2 = date1;

date2.setDay(10);

System.out,println(date1.getinfo());

System.out,println(date2.getinfo());

}

}

Program three

class Bean{

protected int id;

public Bean(int id){

this.id = id;

}

public String toString(){

return “id:” + id;

}

}

class NamesBean extends Bean{

private String name;

public NamedBean(int id,String name){

this.id =id;

this.name = name;

}

public String toString(){

return “Bean:” + name + “\t” + super.toString();

}

}

public class Test{

public static void main(String[] args){

Bean bean_1 = new Bean(100);

System.out.println(bean_1);

Bean bean_2 = new NamedBean(200,”Java Programming”);

System.out,println(bean_2);

bean_1 = bean_2;

bean_1.id = 300;

System.out.println(bean_1);

System.out,println(bean_2);

}

}

程序设计题(共3小题,每题8分,共计24分)

  1. Given class Test as follows.Please complete the program such that it can correctly and output the result as follows.

John’s friend is Mary

Mary’s friend is John

class Person{

String name;

Person friend=null;

public Person(String name) {

this.name = name;

}

void setFriend(Person person) {

this.friend = person;

if(person.friend==null) person.friend=this;

}

String getinfo() {

return name + "'s friend is " + friend.name;

}

}

public class Test{

public static void main(String[] args){

Person john = new Person(“John”);

Person mary = new Person(“Mary”);

john.setFriend(mary);

System.out.println(john.getinfo());

System.out.printlb(mary.grtinfo());

}

}

  1. Given an abstract class Sltape and a test class Test as follows.Please complete the subclass of Shape such that it can run correctly and output the result as follows.

r的面积是:100.0

c的面积是:314.1592653589793

class RectangleShape extends Shape{

double length,width;

public double getArea() {

return length*width;

}

}

class CircleShape extends Shape{

double radius;

public double getArea() {

return radius*radius*Math.PI;

}

}

abstract class Shape{

public abstract double getArea();

}

public class Test{

public static void main(String[] args){

RectangleShape r = new RectangleShap();

r.length = 10;r.width = 10;

System.out,println(“r的面积是:” + r.getArea());

CircleShape c = new CircleShape();

c.radius = 10;

System.out.println(“c的面积是:” + c.getArea());

System.out,println(“Point.counter=” + Point.counter);

}

}

  1. Given class Test follows.Please complete the program such that it can run correctly and output the result as follows.

[Trump’s:1,eldest:1,son:1,has:1,tested:1,positive:1,for:1,the:1,coronavirus:1]

class ArrayList{

Weword[] list = new Weword[9];

int i=0;

int size() {

return i;

}

Weword get(int i){

return list[i];

}

void add(Weword w) {

list[i++]=w;

}

public String toString() {

String ans="[";

for(int j=0;j<i;j++) {

ans+=list[j].word + ":" + list[j].num;

if(j!=i-1) ans+=",";

}

ans+="]";

return ans;

}

}

class Weword{

int num=0;

String word;

Weword(String word){

this.word=word;

}

}

import java.util.*;

public class Test{

private static Weword addTo(Weword w,ArrayList list){

for(int i =0;i < list.size();i==) if(w.equals(list.get(i))) return list.get(i);

list.add(w);

return w;

}

public static void main(String[] args){

String line = “Trump’s eldest son has tested positive for the coronavirus”;

String[] words = line.split(“ “);

ArrayList list = new ArrayList();

for(int i = 0;i < words.length;i++){

Weword w = addTo(new Weword(words[i],list);

w.num++;

}

System.println(list);

}

}

  1. Given class Test as follows.Please complete the program such that it can run correctly and output the result as follows.

(10,10)

圆心:(10,10) 半径:18.8

class Point{

int x,y;

Point(int x,int y){

this.x=x;

this.y=y;

}

String getInfo() {

return "(" + x + "," + y + ")";

}

}

class Circle{

Point center;

double r;

Circle(Point center,double r){

this.center=center;

this.r=r;

}

String getInfo() {

return “圆心:(“ + center.x + center.y + "半径:" + r;

}

}

public class Test{

public static void main(Stringp[] args){

Point p = new Point(10,10);

Circle c = new Circle(p,18.8);

System.out.println(c.center.getInfo());

System.out.println(c.getInfo());

}

}

  1. Given class Test as follows.Please complete the program such that it can run correctly and output the result as follows.

我是经理张三

我是员工李四

class User{

String name;

String say() {

return null;

}

}

class Manager extends User{

Manager(String name){

this.name = name;

}

String say() {

return "我是经理" + name;

}

}

class Employee extends User{

Employee(String name){

this.name = name;

}

String say() {

return "我是员工" + name;

}

}

public class Test{

public static void main(String[] args){

User[] users = {new Manager(“张三”),new Employee(“李四”)};

for(int i = 0;i < users.length;i++){

System.out.println(users[i].say());

}

}

}

  1. Given class Test as follows.Please complete the program such that it can run correctly and output the result as follows.

[Java:12次,NUFE:1次]

class ArrayList{

Word[] words = new Word[100];

int i=0;

boolean contains(Word w) {

for(int j=0;j<i;j++) if(words[j].word.equals(w.word)) return true;

return false;

}

void add(Word w) {

words[i++]=w;

}

public String toString() {

String ans = "[";

for(int j=0;j<i;j++) {

ans+=(words[j].word + ":" + words[j].num + "次");

if(j!=i-1) ans+=",";

}

return ans + "]";

}

}

class Word{

String word;

int num=1;

Word(String word){

this.word=word;

}

}

import java.util.*;

public class Test{

public static void miain(String[] args){

ArrayList list = new ArrayList();

Word[] words = {

new Word(“Java”),

new Word(“NUFE”),

new Word(“Java”)

};

for(int i = 0;i < words.length;i++){

if(list.contains(words[i])) continue;

List.add(words[i]);

}

words[0].num = 122;

System.out,println(list);

}

}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.xdnf.cn/news/1545244.html

如若内容造成侵权/违法违规/事实不符,请联系一条长河网进行投诉反馈,一经查实,立即删除!

相关文章

简单了解Redis(初识阶段)

1.认识Redis 对于Redis有一个很重要的点就是&#xff0c;它存储数据是在内存中存储的。 但是对于单机程序&#xff0c;直接通过变量存储数据的方式是更优的&#xff0c;在分布式系统下 Redis才能发挥威力 因为进程是有隔离性的&#xff0c;Redis可以基于网络&#xff0c;把进…

Lesson1 MySQL的安装(环境为CentOS云服务器)

卸载内置环境 我们初期使用root账号&#xff0c;后期再切换成普通账号 使用 ps axj | grep mysql 查看系统中是否有MySQL相关的进程 使用 systemctl stop mysqld 关停进程 使用 rpm -qa | grep mysql 查看MySQL相关的安装包 使用 rpm -qa | grep mysql | xargs yum -y remo…

计算机毕业设计非遗项目网站 登录注册搜索 评论留言资讯 前后台管理/springboot/javaWEB/J2EE/MYSQL数据库/vue前后分离小程序

遗项目网站需求&#xff0c;以下是一个基于Spring Boot、Java Web、J2EE技术栈&#xff0c;使用MySQL数据库&#xff0c;并结合Vue实现前后端分离的简要设计方案&#xff1a; 系统功能概述 ‌用户登录与注册‌&#xff1a;实现用户的注册、登录功能&#xff0c;确保用户信息的…

【Docker】解决Docker Engine stopped

解决Docker Engine stopped 解决Docker Engine stopped1.检查虚拟设置2 安装wslwindows安装wsl 解决Docker Engine stopped 在安装完docker之后不少用户会遇到Docker Engine stopped。下面就下给出解决方法让docker正常运行起来 1.检查虚拟设置 打开任务管理器查看cpu页面&a…

华为全联接大会HUAWEI Connect 2024印象(五):讯飞星火企业级智能体平台

在HC大会上&#xff0c;除了有华为自己的产品&#xff0c;还有很多合作伙伴的产品&#xff0c;今天就简单说一下讯飞星火的企业级智能体平台。讯飞星火此次在HC上有多个展台。我以前是讯飞星火的拥泵&#xff0c;在B站发过视频介绍其API的使用&#xff08;利用API访问讯飞星火认…

PR视频剪辑工具全指南:开启专业剪辑之旅

pr视频剪辑可以说是视频剪辑里的一把好手&#xff0c;就是如果你想在这方面深耕那还是掌握这个工具的使用比较方便。如果你只是刚入门&#xff0c;那也有不少可以快速帮你剪辑出片的工具。这次我介绍几款我用过的视频剪辑工具&#xff0c;助你开启视频剪辑大门。 1.福昕视频剪…

构建预测睡眠质量模型_相关性分析,多变量分析和聚类分析

数据入口&#xff1a;睡眠质量记录数据集 - Heywhale.com 本数据集目的是探究不同因素是如何影响睡眠质量和整体健康的。 数据说明 字段说明Heart Rate Variability心率变异性&#xff1a;心跳时间间隔的模拟变化Body Temperature体温&#xff1a;以摄氏度为单位的人工生成体…

深度学习(2):梯度下降

文章目录 梯度下降梯度是什么常见梯度下降算法 代码实现批量梯度下降 梯度下降 梯度是什么 类似y ax b这种单变量的函数来说&#xff0c;导数就是它的斜率&#xff0c;这种情况下可以说梯度就是导数。 但在多变量函数中&#xff0c;梯度是一个向量&#xff0c;其分量是各个…

时间序列LSTM实现

这个代码参考了时间序列预测模型实战案例(三)(LSTM)(Python)(深度学习)时间序列预测(包括运行代码以及代码讲解)_lstm预测模型-CSDN博客 结合我之前所学的lstm-seq2seq里所学习到的知识对其进行预测 import time import numpy as np import pandas as pd import torch import…

STM32F407之超声波模块使用

#include "sys.h" #include "delay.h" #include "usart.h" #include "includes.h" #include "HC_SR04.h"int main() {OS_ERR err;//错误uart_init(9600);//串口初始化//超声波初始化HC_SR04();//OS初始化 他是第一个运行的函…

Karmada新版本发布,支持联邦应用跨集群滚动升级

摘要&#xff1a;本次升级支持联邦应用跨集群滚动升级&#xff0c;使用户版本发布流程更加灵活可控&#xff1b;透明同事karmadactl 新增了多项运维能力&#xff0c;提供独特的多集群运维体验。 本文分享自华为云社区 《Karmada v1.11 版本发布&#xff01;新增应用跨集群滚动升…

nfs版本问题导致挂载失败

一、系统环境 环境版本操作系统Linux Mint 22 Wilma内核版本6.8.0-44-genericgcc 版本arm-none-linux-gnueabihf-gcc (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025uboot 版本2020.01开发板Linux版本5.4.31 二、问题描述 内核通过…

Unity开发绘画板——03.简单的实现绘制功能

从本篇文章开始&#xff0c;将带着大家一起写代码&#xff0c;我不会直接贴出成品代码&#xff0c;而是会把写代码的历程以及遇到的问题、如何解决这些问题都记录在文章里面&#xff0c;当然&#xff0c;同一个问题的解决方案可能会有很多&#xff0c;甚至有更好更高效的方式是…

微信小程序——引入 iconfont 矢量图标,如何使用引用阿里巴巴矢量图标

本文介绍如何在小程序中加入图标&#xff0c;效果如下图&#xff1a; 1、访部iconfont-阿里巴巴矢量图标库 找到需要的图标&#xff0c;然后添加入库 将增加好的图标添加到项目中 2、点击更新生成代码 生成后如下图 3、打开生成的css样式文件 4、在小程序中新建/static/iconfon…

AI大模型助力数据消费,构建数据飞轮科学、高效的体系

随着互联网的技术高速发展&#xff0c;越来越多的应用层出不穷&#xff0c;伴随着数据应用的需求变多&#xff0c;为快速响应业务需求&#xff0c;很多企业在初期没有很好的规划的情况下&#xff0c;存在不同程度的烟囱式的开发模式&#xff0c;这样会导致企业不同业务线的数据…

**CentOS7安装redis**

CentOS7安装redis 首先解压压缩包 redis-7.0.0.tar.gz tar -xvf redis-7.0.0.tar.gz接着进入到redis中 cd redis-7.0.0.tar.gz执行make命令编译 make接着执行安装命令 make install之后编译安装完后 程序都会在/usr/local/bin目录下 这里需要将在redis目录中redis.conf配置…

Kubernetes从零到精通(14-Storage)

存储简介 在Kubernetes中&#xff0c;存储是一个关键的部分&#xff0c;用于持久化应用程序的数据。Kubernetes的存储模型支持多种存储类型&#xff0c;并且能根据应用程序的需求动态地提供存储资源。以下是Kubernetes存储的基本概念和机制。 Kubernetes支持很多类型的卷。Pod可…

【Java面向对象高级一08】继承_使用继承的好处

前言 一、继承是什么&#xff1f; 二、使用继承的好处 总结 前言 继承的学习 一、继承是什么&#xff1f; Java中提供了一个关键字extends&#xff0c;用这个关键字&#xff0c;可以让一个类和另一个类建立起父子关系。extends(中文意思就是继承)。 继承的意思是&#xf…

Redis实战--Redis的数据持久化与搭建Redis主从复制模式和搭建Redis的哨兵模式

Redis作为一个高性能的key-value数据库&#xff0c;广泛应用于缓存、消息队列、排行榜等场景。然而&#xff0c;Redis是基于内存的数据库&#xff0c;这意味着一旦服务器宕机&#xff0c;内存中的数据就会丢失。为了解决这个问题&#xff0c;Redis提供了数据持久化的机制&#…

C语言 | Leetcode C语言题解之第434题字符串中的单词数

题目&#xff1a; 题解&#xff1a; int countSegments(char * s){int count 0; //count用来记录单词个数for(int i0; i < strlen(s); i){ //遍历字符串 if((i 0 || s[i-1] ) && s[i] ! ) //一个…