自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 方法的重载

package com.kuang.method; public class Demo02 { public static void main(String[] args) { int max = max(10, 20,30); System.out.println(max); } //比大小 public static int max(double num1,double num2){ int result = 0;.

2021-12-13 17:15:40 70

原创 Jvav方法

System.out.println(); System=类 out=对象 println()方法 public static void main(String[] args) public static修饰词 void返回值“空” package com.kuang.method; public class Demo01 { //main方法 public static void main(String[] args) { // int sum = add(1,.

2021-12-11 20:35:50 269

原创 流程控制.

package com.kuang.struct; public class TestDemo01 { public static void main(String[] args) { //打印三角形 5行 for (int i = 1; i <= 5; i++) { for (int j = 5; j >= i; j--) { System.out.print(" ");

2021-12-08 21:38:16 78

原创 break continue

break package com.kuang.struct; public class BreakDemo { public static void main(String[] args) { int i = 0; while (i<100){ i++; System.out.println(i); if (i==30){ break; .

2021-12-06 19:20:01 61

原创 循环结构.

While 循环 package com.kuang.struct; public class WhileDemo01 { public static void main(String[] args) { //输出1~100 int i = 0; while (i<100){ i++; System.out.println(i); } } } package c.

2021-12-04 21:58:42 419

原创 顺序结构 .

顺序结构 public class ShunXuDemo { public static void main(String[] args) { System.out.println("hello1"); System.out.println("hello2"); System.out.println("hello3"); System.out.println("hello4"); System.out.println

2021-12-02 22:20:41 71

原创 Java流程控制

用户交互Scanner else 判断语句 while 循环语句 scanner 接收用户输入 package com.kuang.scanner; import java.util.Scanner; public class Demo01 { public static void main(String[] args) { //创建一个扫描器对象,用于接收键盘数据 Scanner scanner = new Scanner(System.in); System.out.pr

2021-11-30 16:59:30 66

原创 包机制..

包机制 Java Doc cmd javadoc -encoding UTF-8 -charset UTF-8 Doc.java package com.kuang.base; /** @author Boge @version 1.0 @since 1.8 */ public class Doc { String name; /** @author Boge @param name @return @throws Exception */ public String test(String

2021-11-29 18:53:55 263

原创 ++ -- 自增,自减 一元运算符

package operator; public class Demo04 { public static void main(String[] args) { // ++ – 自增,自减 一元运算符 int a = 3; int b = a++; //执行完这行代码后,先给b赋值,在自增 //a = a + 1 System.out.println(a); System.out.println(b); //a = a + 1 int c = ++

2021-11-29 18:51:18 102

原创 运算符..

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-SN2Gf00X-1638109289822)(C:\Users\Administrator\Desktop\屏幕截图 2021-11-28 214928.png)] ackage operator; public class Demo01 { public static void main(String[] args) { //二元运算符 //Ctrl + D :复制当前行到下一行 int a = 10; int b = 20;

2021-11-28 22:22:41 66

原创 变量...

public class Demo07 { public static void main(String[] args) { //int a,b,c //int a=1,b=2,c=3;//程序可读性 String name = “boge”; char x = ‘X’; double pi = 3.14; } } public class Demo08 { //类变量 static static double salary = 2500; //属性:变量 //实例变量:从属于对象;如果不进行初始化,这

2021-11-28 22:21:11 67

原创 【无标题】

public class Demo05 { public static void main(String[] args) { int i = 128; byte b = (byte)i; //内存溢出 //强制转换 (类型)变量名 高--低 //自动转换 低--高 System.out.println(i); System.out.println(b); } } public class Demo05 { public static void main(

2021-11-28 22:20:32 52

原创 转义字符.

// \t 制表符 // \n 换行 //… System.out.println("Hello\nWorld"); // String sa = new String( "hello world"); String sb = new String( "hello world"); System.out.println(sa==sb); String sc = ("hello world"); String sd = ("hello wor

2021-11-28 22:19:30 75

原创 标识符..

//八大基本数据类型 //整数 int num1 = 10;//最常用的 //占4个字节 byte num2 = 20; Short num3 = 30; long num4 = 30L;//long类型要在数字后加L //占8个字节 //小数:浮点数 float num5 = 50.1F; //占4个字节 double num6 = 3.1314; //占8个字节 //字符 char name = ‘博’; //字符串,String 不是关键字。是’类‘ String namea = “博哥”;

2021-11-27 22:22:31 76

原创 HelloWorld

HelloWorld public class Hello{ public static void main(String[] args){ System.out.print("Hello,World!"); } } 编译 javac java文件,生成class文件 运行class文件,java class文件 [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-kTjQGPD1-1637937676222)(C:\Users\Administrator\D

2021-11-26 22:42:00 187

原创 【无标题】

这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入 欢迎使用Markdown编辑器 你好! 这是你第一次使用 Markdown编辑器 所展示的欢迎页。如果你想学习如何使用Mar

2021-11-24 21:55:19 58

原创 Markdown学习

标题: 二级标题 四级标题 三级标题 字体 hello,world! hello,world! hello,world! hello,world! hello,world! 引用 吉拉克的我决定了 分割线 图片 超链接 点击跳转到 列表 A B C a b C 表格 名字 性别 生日 张三 男 1997.1.1 代码 ​

2021-11-24 21:25:38 62

空空如也

空空如也

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

TA关注的人

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