摘要: 有返回值的:package yesreturn;public class methodDemo01 { public static void main(String[] args) { //非void方法用变量接受调用 boolean flag = isEvenNum(2); System.out. 阅读全文
posted @ 2021-11-11 15:18 小风扇呜呜呜 阅读(76) 评论(0) 推荐(0)
摘要: package com.daxing;public class See { public static void main(String[] args) { System.out.println("学号\t年龄\t地址\t姓名"); }}输出: 学号 年龄 地址 姓名 Process finishe 阅读全文
posted @ 2021-11-09 16:00 小风扇呜呜呜 阅读(102) 评论(0) 推荐(0)
摘要: package com.daxing_01;import java.util.ArrayList;import java.util.Scanner;public class ArrayListDemo05 { public static void main(String[] args) { /* / 阅读全文
posted @ 2021-11-04 16:03 小风扇呜呜呜 阅读(47) 评论(0) 推荐(0)
摘要: package com.daxing_01;public class StringBuiderDemo02 { public static void main(String[] args) { //StringBuilder转化为String StringBuilder st = new Strin 阅读全文
posted @ 2021-11-04 10:18 小风扇呜呜呜 阅读(228) 评论(0) 推荐(0)
摘要: package com.daxing_01;/*需求: 已知用户名和密码,请用程序实现模拟用户登录,一共3次机会,登陆之后给出相应的提示。思路: 1、已知用户名和密码,定义2个字符串; 2、键盘录入要登录的用户名和密码,用Scanner实现; 3、将键盘录入要登录的用户名和密码与已知的用户名密码比较 阅读全文
posted @ 2021-10-31 19:45 小风扇呜呜呜 阅读(223) 评论(0) 推荐(0)
摘要: package com.daixng_07;public class Student { private String name; private int age; //有参构造方法 public Student(String name, int age) { this.name = name; t 阅读全文
posted @ 2021-10-30 11:31 小风扇呜呜呜 阅读(37) 评论(0) 推荐(0)
摘要: package com.daxing_06;//学生类public class Student { //成员变量 private String name; private int age; //get/set方法 public void setName(String n) { name = n; } 阅读全文
posted @ 2021-10-30 10:53 小风扇呜呜呜 阅读(94) 评论(0) 推荐(0)
摘要: package com.itheuma_03;public class ArrayTest08 { public static void main(String[] args) { int[] arr = {10, 20, 30}; System.out.println("change前" + ar 阅读全文
posted @ 2021-10-19 23:05 小风扇呜呜呜 阅读(29) 评论(0) 推荐(0)
摘要: package com.lianxi;import java.util.Scanner;public class SwitchSeason { public static void main(String[] args) { Scanner sc = new Scanner(System.in); 阅读全文
posted @ 2021-10-16 22:20 小风扇呜呜呜 阅读(38) 评论(0) 推荐(0)
摘要: package com.guan.struct;public class ForDemo03 { public static void main(String[] args) { //用while或者for循环求出1000内能被5整除的数,且以每行3个的形式输出 for (int i = 1; i 阅读全文
posted @ 2021-10-01 09:16 小风扇呜呜呜 阅读(131) 评论(0) 推荐(0)