摘要: Scanner对象 1.用Nextpackage com.QyShark;​import java.util.Scanner;​public class scanner { public static void main(String[] args) { //从键盘接收数据 Scanner scan 阅读全文
posted @ 2021-11-02 13:16 QyShark 阅读(181) 评论(0) 推荐(0)
摘要: 步骤1:先打印矩形中左边三角形的空白部分 public class TestDemo { public static void main(String[] args) { for (int i = 1; i <= 5; i++) { for (int j = 5; j >= i; j--) { Sy 阅读全文
posted @ 2021-11-02 13:15 QyShark 阅读(228) 评论(0) 推荐(0)
摘要: While 先判断后执行 public class Demo1 { public static void main(String[] args) { int i = 0; int sum = 0; while(i<=100){ sum=sum+i; i++; } System.out.println 阅读全文
posted @ 2021-11-02 13:13 QyShark 阅读(59) 评论(0) 推荐(0)
摘要: //写一个99乘法表 快捷键:10.for -- for(int i=0;i<10;i++) public class chengfabiaoDemo2 { public static void main(String[] args) { for (int j = 1; j <= 9; j++) { 阅读全文
posted @ 2021-11-02 13:12 QyShark 阅读(394) 评论(0) 推荐(0)
摘要: 一、逻辑与运算符 与(&&) 或(||) 非(!) public class day3{ public static void main(String[ ] agrs){ boolean a=true; boolean b=false; System.out.println("a && b:"+(a 阅读全文
posted @ 2021-11-02 13:11 QyShark 阅读(49) 评论(0) 推荐(0)
摘要: 一、Idea快捷输入 1.输入psvm自动生成 public static void main(String[ ] args){} 2.输入sout自动生成 System.out.println(); 二、进制表示 int a1=10;int a2=0b10; //二进制0b开头int a3=010 阅读全文
posted @ 2021-11-02 13:10 QyShark 阅读(112) 评论(0) 推荐(0)