• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

HSpringX

大学生入门笔记
  • 博客园
  • 联系
  • 订阅
  • 管理

公告

2021年12月25日

方法的调用(类方法和成员方法)

摘要: public class Test1 { public static void main(String[] args) { int show = show();//直接调用 System.out.println("类方法:"+show); int add = Student.add(11, 12); 阅读全文

posted @ 2021-12-25 15:03 HSpringX 阅读(133) 评论(0) 推荐(0)

for循环(打印九九乘法表+增强for循环遍历数组)

摘要: public class Test7 { public static void main(String[] args) { //打印九九乘法表 int s = 0; for (int i=1;i<10;i++){ for (int u=1;u<=i;u++){ s = i*u; System.out 阅读全文

posted @ 2021-12-25 10:38 HSpringX 阅读(53) 评论(0) 推荐(0)

switch结构

摘要: public class Test6 { public static void main(String[] args) { char grade = 'C'; switch (grade) { case 'A': System.out.println("优秀"); break; case 'B': 阅读全文

posted @ 2021-12-25 09:48 HSpringX 阅读(42) 评论(0) 推荐(0)

Scanner的使用(数值相加)

摘要: public class Test5 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println("请输入需要相加的数(输入x结束):"); int s 阅读全文

posted @ 2021-12-25 09:25 HSpringX 阅读(77) 评论(0) 推荐(0)

 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3