day05

标识符

img

标识符的注意点

img

如下所示

 public class Demo01 {
     public static void main(String[] args) {
 
         //大小写敏感
         String Ahello="jipo";
         String hello="jipo";
         String $hello="jipo";
         String _hello="jipo";
    }
 }

 

数据类型

img

如下所示

 public class Dome02 {
     public static void main(String[] args) {
         String a = "hello";
         int num = 10;
         System.out.println(a);
         System.out.println(num);
    }
 }
 public class Demo03 {
     public static void main(String[] args) {
         //八大基本数据类型
 
         //整数
         int num1=10;//最常用
         byte num2=20;
         short num3=30;
         long num4=30L;//Long类型要在数字后面加个L
 
         //小数;浮数点
         float num5=50.1f;
         double num6=3.1415926535;
 
         //字符
         char name ='A';
         //字符串,String不是关键词,类
         //String name1="jp";
 
         //布尔值:是非
         boolean flag=true;
         boolean flag1=false;
 
 
    }
 }

 

什么是字节

img

 

 

 

 

 

 

 

posted @ 2021-02-22 22:53  追风侍卫  阅读(66)  评论(0)    收藏  举报