## 总结
#### 1.git
> git 基础指令
```shell
win cls 清屏
cd Desktop/ 切换到桌面
```
工作区 版本库 远程仓库
git init 初始化一个工作区 显示以下代表初始化成功
```shell
Initialized empty Git repository in /Users/zwb/Desktop/project/.git/
```
git add . 将所有的文件提交到暂存区
git commit 将暂存区的内容提交到版本库
git status 是用来查看状态 这是一个干净的工作区
```shell
On branch master
nothing to commit, working tree clean
```
#### Git 全局设置:
```
git config --global user.name "xxxxx" 全局设置你的用户名
git config --global user.email "xxxx" 全局设置你的邮箱
```
```
git init 初始化git
touch README.md 创建一个文件 touch 指令只能用在liunx 或者 macos 系统上 git 上集成部分liunx指令
git add README.md 将创建的README.md 提交到暂存区
git commit -m "first commit" 将暂存区的内容commit 提交到版本库
git push -u origin "master" 将文件推送到远程平台的主分支上 下一次提交 不需要 再加-u 直接git push
```
```she
git config--list
```
这一个星期,老师还带领我们复习了大一下学期的一些知识,包括
#### Java基础基础数据类型
```
基础数据类型 直接放到 栈内存 先进后出的结构类型
byte (字节) short(短字节) int(整型) long(长类型) float(浮点 单精度) double(双精
度) char (单字节 ) boolean (true/false)
new Object [] {}(狭义 object) Object function(函数)
```
2. #### 面向对象
1.私有化成员变量
2.get set 方法
3.有参构造 无参构造
快捷键生get 和 set 方法 还有有参构造函数 alt +insert(可以加FN )
```
package com.whys;
public class Animal {
//psvm 生成主入口
// sout 生成System.out.println()
private String name;
private String sex;
// 无参构造
public Animal(){};
数组的声明
int a[] = new a[4];
int a[] = {1,2,3,4}
数组求和的案例
// 有参构造
public Animal(String name, String sex) {
this.name = name;
this.sex = sex;
}
// alt + insert 快捷键 生成get 和 set 方法
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
}
package com.whys;
import java.util.Scanner;
public class ArrayDemo01 {
public static void main(String[] args) {
// int [] arr = new int[4] int [] arr = {1,2,3}
```
#### 数组求和
```
int[] a = new int[5];
// 调用打印
Scanner sc = new Scanner(System.in);
for (int i = 0; i <a.length ; i++) {
System.out.println("请输入第"+(i+1)+"个元素");
a[i] = sc.nextInt();
}
System.out.println("数组的元素为:");
for (int i = 0; i < a.length ; i++) {
System.out.println(a[i]+" ");
}
int sum =0; // 初始值
for (int i = 0; i <a.length ; i++) {
sum += a[i]; //sum = sum + a[i]
}
System.out.println("总和为"+sum);
}
```
#### 还包括jdk的安装与环境变量的配置,Mysql的安装以及Navicat的安装与使用
#### 还有关于win dos指令知识的讲解
常见的系统
- win dos 指令
- mac (苹果) shell 指令
- liunx(命令终端的 没有磁盘的概念 文件夹 并且在操作的时候都是使用指令) 安卓 鸿蒙 shell 指令
切换指令 touch
```shell
win+R打开运行窗口 输入cmd 打开终端
```
dir 指令 查看文件夹
```shell
cd / 切换到根的位置
cd /d 盘符E: 切换到E盘盘符
```
cls 清除指令(清屏)
```shell
C:\Users\acer>cd Desktop 进入桌面
C:\Users\acer\Desktop>mkdir kk 创建文件夹 创建文件夹mkdir
驱动器 C 中的卷没有标签。
卷的序列号是 E4DE-84E2
2024/09/12 15:04 <DIR> .
2024/09/12 15:04 <DIR> ..
0 个文件 0 字节
C:\Users\acer\Desktop\kk>type null > 1.txt type null > 文件名 创建一个文件
系统找不到指定的文件。
C:\Users\acer\Desktop\kk>
```
可以在dos 窗口 输入 help 查看帮助文档
删除指令 delete
```shell
del 文件名
```
md 和 mkdir 创建文件夹
```shell
mkdir 文件夹名字
md 文件夹名字
```
copy 拷贝
```shell
>copy ms.md ms1.md
```
cls 清屏
ren 重命名
```shell
C:\Users\acer\Desktop\news>ren 1.txt 2.txt
```
move 移动指令
```shell
```
noteapd 打开记事本
shutdown -s -t 0 (设置关机时间 当为0的时候 是立刻关机)
ping www.xxx.com 查看网络是否畅通
因篇幅问题不能全部显示,请点此查看更多更全内容