自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 summarize(借鉴)

I turned 20 last week and a friend asked me if I’d figured out any life advice in the past decade worth passing on. I’m somewhat hesitant to publish this because I think these lists usually seem hollow, but here is a cleaned up version of my answer:Nev

2021-04-23 08:47:38 239

原创 JAVA 异常体系 / 自定义异常类

关于 Java 异常体系:–顶层的 Throwable, 派生出两个重要的子类: Error 和 Exception;–Error 是指 Java 运行时的内部错误和资源耗尽错误,不抛出此类异常,这类错误一旦发生除了告知用户并终止程序外别无他发,一般很少发生;–Exception 是程序猿一般使用的异常类的父类;–其中 Exception 有一个重要的子类: RuntimeExcepti...

2020-04-19 13:48:29 253

原创 JAVA SE 总结

JAVA SE 总结环境基本概念JDK java软件开发包JRE java运行时环境JVM java虚拟机编译时运行过程:先 javac 再 java变量和类型概念变量:运行过程中可以改变的量常量:运行过程中不能改变的量(1)final(2)字符串常量,“hehe”,10,10.0内置类型||1个字节 | -128 -> 127|shor...

2020-04-12 00:06:39 157

原创 JAVA链表练习

顺序表import java.util.Arrays;public class MyArrayList { private int[] elem;//null private int usedSize;//0 //设置默认容量 private static final int DEFAULT_SIZE = 3; public MyArrayList...

2020-03-27 17:25:16 141

原创 JAVA类与对象练习

写一个类Calculator,有两个属性num1,num2,这两个数据的值,不能在定义的同时初始化,最后实现加减乘除四种运算class Calcuter{ private int num1; private int num2; public int add(int num1 ,int num2 ){ this.num1 = num1; t...

2020-03-22 12:32:16 152

原创 JAVA有关数组的三个问题(偶前奇后 / 冒泡 / 逆置 )

public static void transform(int[] arr) { int left = 0; int right = arr.length - 1; while (left < right) { // 该循环结束, left 就指向了一个奇数 while (left &l...

2020-03-20 11:55:20 105

原创 JAVA汉诺塔/青蛙跳台阶

public class Mian { /** * 1; A-> C 1 2^1-1 * 2: A->B A-> C B->C 3 2^2 -1 * 3: A->C A->B C->B A->C B->A B->C A->C ...

2020-03-14 22:00:53 80

原创 JAVA猜数字游戏 / 素数 / 乘法表 / 最大公约数/ 1-100 的9 / 水仙花数

import java.util.Random;public static void main(String[] args) { Scanner scan = new Scanner(System.in); Random random = new Random(); int rand = random.nextInt(100);//[0-1...

2020-03-08 14:17:16 250

原创 JAVA变量和运算符的基本知识点

一、变量基本知识点二.运算符(运算符之间是有优先级的(注意短路))1.算术运算符基本四则运算:+ - * / %注意:除法运算时,0不能做除数% 表示取余,不仅可以对 int 求模,也能对 double 求模2.增量赋值运算符+= -= *= /= %= 3.自增自减运算符++ –4.关系运算符== != < > <= >=...

2020-03-04 11:40:52 117

原创 冯诺依曼体系

1.冯·诺依曼体系结构 也是现代计算机的 硬件 体系结构,它包括五大硬件单元: a) 输入设备:键盘 b) 输出设备:显示器 c) 存储器:内存 d) 运算器:用于完成 算术运算 和 逻辑运算 e) 控制器 其中 运算器 和 控制器 组成 中央处理器,也叫 CPU。2.计算机所具备的功能: a...

2020-02-26 17:43:30 387

原创 C:关于斐波那契

FIRST:#include <stdio.h>int fib(int n){ if (n <= 2) return 1; else return fib(n - 1) + fib(n - 2);}int main(){ int x = 0; printf("please check a num:\n"); scanf("%d",&x);...

2020-02-20 21:08:28 185

原创 C:(important)编写函数不允许创建临时变量,求字符串的长度

#include <stdio.h>int Strlen(char* len){ int count = 0; while(*len !='\0') { count++; len++; } return count;}int main(){ int length = Strlen("asgdfhjgk"); printf("%d",length); }...

2020-02-19 20:41:17 177

原创 C:(简单递归)接受一个整型值(无符号),按照顺序打印它的每一位。 例如: 输入:1234,输出 1 2 3 4.

#include <stdio.h>void print(int x){ if(x>9) { print(x/10); } printf("%d ",x%10);}int main(){ int i = 0; scanf("%d",&i); print(i); }

2020-02-18 17:28:35 382

原创 C: part of 函数

写一个函数可以判断一个数是不是素数。#include <stdio.h>#include <math.h>int is_prime(int x){ int i = 0; for(i = 2;i < sqrt(x);i++) { if(x % i==0) { return 0; } } return 1;}int main()...

2020-02-17 16:53:42 147

原创 C:传址与传值

#include <stdio.h>void Swap1(int x, int y){ int tmp = 0; tmp = x; x = y; y = tmp;}void Swap2(int *px, int *py){ int tmp = 0; tmp = *px; *px = *py; *py = tmp;}int main(){ int nu...

2020-02-17 12:45:30 747

原创 C:一个整蛊关机的小代码

Add:1、用shutdown -s -t 60 (60表示60秒,可以自行设定)2、shutdown -a 就可以中止关机3、在cmd里面输入shutdow/?,就可以知道命令的使用。#include <stdio.h>#include <stdlib.h>int main(){ char input[10] = {0}; system...

2020-02-15 17:05:14 636

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除