摘要:
数组 package com.xw.Array; public class ArrayD01 { public static void main(String[] args) { //变量类型 变量的名字 = 变量的值; //数组类型 int[] nums;//声明一个数组 //int nums2[ 阅读全文
posted @ 2024-03-15 00:00
小王重生归来
阅读(17)
评论(0)
推荐(0)
摘要:
循环结构 while循环 package com.xw.struct; public class WhileD01 { public static void main(String[] args) { //输出1~100 int i = 0; while (i<100){//i>100就停止循环 i 阅读全文
posted @ 2024-03-15 00:00
小王重生归来
阅读(28)
评论(0)
推荐(0)
摘要:
选择结构 if单选结构 package com.xw.struct; import java.util.Scanner; public class IfD01 { public static void main(String[]args){ Scanner scanner = new Scanner 阅读全文
posted @ 2024-03-15 00:00
小王重生归来
阅读(13)
评论(0)
推荐(0)
摘要:
用户交互scanner next的接收方式 package com.xw.scanner; import java.util.Scanner; public class D01 { public static void main(String[] args) { //创建一个扫描器对象,用于接收键盘 阅读全文
posted @ 2024-03-15 00:00
小王重生归来
阅读(19)
评论(0)
推荐(0)
摘要:
JavaDoc package com.xw.base; /** * @author xiaowang * @version 1.0 */ public class Doc { System name; /** * @param name * @return * @throws Exception 阅读全文
posted @ 2024-03-15 00:00
小王重生归来
阅读(17)
评论(0)
推荐(0)
摘要:
运算符 加减乘除 package operator; public class D01 { public static void main(String[] args) { int a =10; int b =20; int c =25; int d =30; System.out.println( 阅读全文
posted @ 2024-03-15 00:00
小王重生归来
阅读(22)
评论(0)
推荐(0)
摘要:
类型转换 public class D06 { public static void main(String[] args) { //int i =128; /*byte b =(byte) i;*///内存溢出 //强制转换(类名)变量名 高 低 //自动转换(类名)变量名 低 高 /*doubl 阅读全文
posted @ 2024-03-14 23:59
小王重生归来
阅读(15)
评论(0)
推荐(0)
摘要:
变量 public class D04 { //类变量 static double salary=2500; //属性 //实例变量:从属于对象;如果不自行初始化,这个类型的默认值 0 / 0.0 //布尔值默认是false //除了基本类型其他都是null String name; int age 阅读全文
posted @ 2024-03-14 23:59
小王重生归来
阅读(22)
评论(0)
推荐(0)
摘要:
数据类型 import org.omg.CORBA.INTERNAL; import java.sql.SQLOutput; public class D02 { public static void main(String[] args) { //基本数据类型(primitive type) // 阅读全文
posted @ 2024-03-14 23:59
小王重生归来
阅读(15)
评论(0)
推荐(0)

浙公网安备 33010602011771号