Fork me on GitHub
摘要: Day7 //main方法 public static void main(String[] args) { } /* 修饰符 返回值类型 方法名(。。。){ //方法体 return 返回值; } */ public String sayHello(){ return "hello world"; 阅读全文
posted @ 2024-01-30 09:53 一枚菜菜的新手 阅读(13) 评论(0) 推荐(0)
摘要: Day6 public static void main(String[] args) { int[] nums;//定义一个数组 nums=new int[10]; nums[0]=1; nums[1]=2; nums[2]=3; nums[3]=4; nums[4]=5; nums[5]=6; 阅读全文
posted @ 2024-01-29 20:37 一枚菜菜的新手 阅读(18) 评论(0) 推荐(0)
摘要: 命令行传递参数 示例图片: 初识java Day5 public static void main(String[] args) { int i=0; while (i<100){ i+=1; System.out.println(i); if (i==30){ break; } } } publi 阅读全文
posted @ 2024-01-28 08:57 一枚菜菜的新手 阅读(22) 评论(0) 推荐(0)
摘要: day4 java新手随笔练习 public class Doc { String name; //属性 /** * since 指明需要最早使用的jak版本 * @author wushen 作者名 * @param name 参数名 * @return 返回值情况 * @throws Excep 阅读全文
posted @ 2024-01-27 12:03 一枚菜菜的新手 阅读(24) 评论(0) 推荐(0)
摘要: public class Test01 { public static void main(String[] args) { //二元运算符 int a=10; int b=20; int c=25; int d=25; System.out.println(a+b); System.out.pri 阅读全文
posted @ 2024-01-26 09:15 一枚菜菜的新手 阅读(26) 评论(0) 推荐(0)
摘要: day2 package base; public class Test05 { public static void main(String[] args) { int i=128; byte b= (byte) i; //强制转换 (类型)变量名 System.out.println(i); S 阅读全文
posted @ 2024-01-25 20:12 一枚菜菜的新手 阅读(60) 评论(0) 推荐(0)
摘要: day1 public class test01 { public static void main(String[] args) { String 王者荣耀="百星"; System.out.println(王者荣耀); String Abcd="wujia"; String abcd="wuji 阅读全文
posted @ 2024-01-24 22:43 一枚菜菜的新手 阅读(28) 评论(0) 推荐(0)