自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 For循环:打印三角形

For循环:打印三角形public class ForSanJiao { public static void main(String[] args) { //打印三角形 五行 for (int i = 1; i <= 5; i++){ for (int j = 5; j >= i; j--){ System.out.print(" "); } f

2021-06-27 21:08:04 79

原创 While与DoWhile计算1+2+3+......+100和两者的区别

While与DoWhile计算1+2+3+…+100和两者的区别Whilepublic class While { public static void main(String[] args) { //计算1+2+3+4+....+100等于多少 int i = 0; int sum = 0; while (i<=100){ sum = sum + i; i++;

2021-06-27 02:01:01 459

原创 用户交互Scanner

用户交互Scannernext():1.一定要读取到有效字符后才可以结束输入。2.对输入有效字符之前遇到空白,next() 方法会自动将其去掉。3.只有输入有效字符后才将其后面输入的空白作为分隔符或者结束符。4.next() 不能得到带有空格的字符串。package com.yang.scanner;import java.util.Scanner;public class Demo01 { public static void main(String[] args) {

2021-06-25 16:11:26 60

原创 位运算+字符串连接符+三元运算符

位运算+字符串连接符+三元运算符位运算++class day02{ public static void main (String[] args){ /* A = 0011 1100 B = 0000 1101 ----------------------------- A&B = 0000 1100 A|B = 0011 1101 A^B = 0011 0001

2021-06-24 20:51:40 58

原创 数据类型+

day01整形 intpublic class day01{ public static void main(String[] args){ //整数扩展 进制 二进制0b 十进制 八进制0 十六进制0x int i1 = 10; int i2 = 0b10;//二进制0b int i3 = 010;//八进制0 int i4 = 0x10;//十六进制0x 0~9

2021-06-24 00:46:56 63

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除