摘要: package com.Fei.java.L2;public class domo6 { public static void main(String[] args) { int max = max(10,10); int sum = add(10,20); System.out.println(s 阅读全文
posted @ 2021-03-04 13:19 Joey19 阅读(39) 评论(0) 推荐(0)
摘要: package com.Fei.java.L2;public class TestDemo { public static void main(String[] args) { //打印一个三角形,五行 for (int h = 1; h <= 5; h++) {//五行之内循环 for (int 阅读全文
posted @ 2021-03-03 10:58 Joey19 阅读(36) 评论(0) 推荐(0)
摘要: //九九乘法表for (int i1 = 1; i1 <= 9; i1++) { for (int i2 = 1; i2 <= i1; i2++) { System.out.println(i2+"*"+i1+"="+(i1*i2)+"\t"); } System.out.println("\n") 阅读全文
posted @ 2021-03-02 13:17 Joey19 阅读(60) 评论(0) 推荐(0)
摘要: package com.Fei.java.L2;import java.util.Scanner;public class demo4 { public static void main(String[] args) { //我们可以输入多个数字,并求其总和与平均数,每输入一个数字用回车确认,通过输 阅读全文
posted @ 2021-03-01 11:01 Joey19 阅读(25) 评论(0) 推荐(0)
摘要: public class demo5 { public static void main(String[] args) { int a = 10; int b = 20; a+=b;//a = a+b a-=b;//a = a-b System.out.println(a); //字符串连接符 Sy 阅读全文
posted @ 2021-03-01 09:06 Joey19 阅读(34) 评论(0) 推荐(0)
摘要: public class demo4 { //逻辑运算符 public static void main(String[] args) { //与(&&)或(||)非(!) boolean a = true; boolean b = false; System.out.println(a && b) 阅读全文
posted @ 2021-02-28 19:50 Joey19 阅读(57) 评论(0) 推荐(0)
摘要: public class demo3 { public static void main(String[] args) { //++ -- 自增 自减 一元运算符 int a = 3; int b = a++;//执行完这个代码后,先给b赋值,a再自增 int c = ++a;//执行完这个代码前, 阅读全文
posted @ 2021-02-28 19:16 Joey19 阅读(26) 评论(0) 推荐(0)
摘要: public class demo2 { public static void main(String[] args) { //低 >高 //byte,short,char->int->long->float->double int i = 128; byte b = (byte)i;//byte不 阅读全文
posted @ 2021-02-28 10:28 Joey19 阅读(45) 评论(0) 推荐(0)
摘要: //八大基本数据类型//整数类byte n1 = 10;// Byteshort n2 = 10;int n3 = 10;//最常用 Integerlong n4 = 10L;//long类型后面要加L//浮点类float n5 = 10.5F;//float类型后面要加Fdouble n6 = 1 阅读全文
posted @ 2021-02-28 09:47 Joey19 阅读(109) 评论(0) 推荐(0)
摘要: 打开cmd的方式 开始+系统+命令提示符 Win+R 输入cmd 常用的DOS命令 #盘符切换 盘符+:+回车#查看当前目录下的所有文件dir (directory)#切换目录cd (change directory)cd ..返回上一级cd+/d 跨盘符操作​#新建文件夹md (make dire 阅读全文
posted @ 2021-02-25 17:27 Joey19 阅读(24) 评论(0) 推荐(0)