摘要: 1 #include<iostream> 2 using namespace std; 3 4 int main() 5 { 6 7 8 //利用冒泡排序实现升序序列 9 10 int arr[] = {4,2,8,0,5,7,1,3,9}; 11 12 cout << sizeof(arr)/ s 阅读全文
posted @ 2021-07-27 13:47 找不到北的北 阅读(23) 评论(0) 推荐(0)
摘要: 1 C++初识 1.1 第一个C++程序 编写一个C++程序总共分为4个步骤 创建项目 创建文件 编写代码 运行程序 1.1.1 创建项目 ​ Visual Studio是我们用来编写C++程序的主要工具,我们先将它打开 1.1.2 创建文件 右键源文件,选择添加->新建项 给C++文件起个名称,然 阅读全文
posted @ 2021-06-05 10:19 找不到北的北 阅读(651) 评论(0) 推荐(0)
摘要: 1 package InterfacePlayerAndCoach; 2 3 public abstract class Person { 4 private String name; 5 private int age; 6 7 public Person() { 8 } 9 10 public 阅读全文
posted @ 2021-02-22 20:10 找不到北的北 阅读(173) 评论(0) 推荐(0)
摘要: 1 package InterfaceCat; 2 3 public interface Jumpping { 4 public abstract void jump(); 5 } 1 package InterfaceCat; 2 3 public abstract class Animal { 阅读全文
posted @ 2021-02-22 20:06 找不到北的北 阅读(115) 评论(0) 推荐(0)
摘要: 1 package InterfaceAndClass; 2 3 public interface Inter1 { 4 } package InterfaceAndClass; public interface Inter2 { } 1 package InterfaceAndClass; 2 3 阅读全文
posted @ 2021-02-22 20:04 找不到北的北 阅读(53) 评论(0) 推荐(0)
摘要: package InterfaceAndAbstract;/* 抽象类和接口的区别 成员区别 抽象类 变量,常量;有构造方法;有抽象方法,也有非抽象方法 接口 常量;抽象方法 关系区别 类与类 继承,单继承 类与接口 实现,可单实现,也可以多实现 接口与接口 继承,单继承,多继承 设计理念的区别 抽 阅读全文
posted @ 2021-02-22 20:03 找不到北的北 阅读(66) 评论(0) 推荐(0)
摘要: 1 package Interface01; 2 /* 3 定义了一个接口 4 */ 5 public interface Jumpping { 6 7 public abstract void jump(); 8 } 1 package Interface01; 2 3 public class 阅读全文
posted @ 2021-02-22 20:01 找不到北的北 阅读(51) 评论(0) 推荐(0)
摘要: 1 package Interface; 2 3 public interface Inter { 4 5 public int num = 10; 6 public final int num2 = 20; 7 8 int num3 = 30; 9 10 public abstract void 阅读全文
posted @ 2021-02-22 19:59 找不到北的北 阅读(50) 评论(0) 推荐(0)
摘要: 1 package duoTai08; 2 3 public abstract class Animal { 4 private int age = 20; 5 private final String city = "北京"; 6 7 public Animal(){} 8 9 public An 阅读全文
posted @ 2021-02-22 19:57 找不到北的北 阅读(64) 评论(0) 推荐(0)
摘要: 1 package duoTai07; 2 /* 3 在java中,一个没有方法体的方法应该定义为抽象方法,而类中如果有抽象方法,该类必须定义为抽象类 4 5 抽象类和抽象方法必须使用abstract关键字修饰 6 public abstract class 类名{} 7 public abstra 阅读全文
posted @ 2021-02-22 19:55 找不到北的北 阅读(62) 评论(0) 推荐(0)