当前位置:网站首页>【day01】前言、入门程序、常量变量
【day01】前言、入门程序、常量变量
2022-07-17 05:36:00 【Люй ли】
13.程序注释与HelloWorld说明


14.关键字的概念与特征
15.标识符的概念与规则

16.常量的概念与分类
17.常量的打印输出
对于字符常量:两个单引号中间必须有且仅有一个字符,没有不行;有两个也不行
对于空常量:空常量不能直接用来打印输出
18.基本数据类型
数据类型有两种:
1.基本数据类型
2.引用数据类型:字符串、数组、类、接口、Lambda

字符串是引用类型,不是基本数据类型。
19.变量的概念与定义格式
20.变量的基本使用
不能重复创建名称一样的变量
没有赋值的变量不能使用
21.变量的注意事项

使用变量的时候,有一些注意事项:
1.如果创建多个变量,那么变量之间的名称不可以重复
2.对于float和long类型来说,字母后缀F和L不要丢掉
3.如果使用byte或者short类型的变量,那么右侧的数据值不能超过左侧类型的范围
4.没有进行赋值的变量,不能直接使用;一定要赋值之后,才能使用
5.变量使用不能超过作用域的范围
【作用域】:从定义变量的一行开始,一直到直接所属的大括号结束为止
变量必须先定义后使用
变量若是超出了大括号的范围,超出了作用域,变量不能再使用了
6.可以通过一个语句来创建多个变量,但是一般情况下不推荐这么写

边栏推荐
- Introduction to 3D Visualization: see how rendering pipelines work in GPU
- Component emit Foundation
- MongoDB的下载、安装和使用
- Review of 4246 Algorithms for Data Science
- Solution to the conflict between security automatic login and anti CSRF attack
- TSN security protocol (802.1qci)
- Network knowledge-02 physical layer
- 正则表达示提取匹配内容
- Xiaoyi and you talk about how to realize c-v2x HIL test in v2x test series (2022 version)
- Extortion virus of enterprise data governance
猜你喜欢

This article introduces you to SOA interface testing

SQL刷题总结 SQL Leetcode Review

High concurrency day02 (concurrent package)

Component emit Foundation

Summary of Statistics for Interview

目标检测和边界框

Product Case Interviews

How to output a digital diamond with a for loop

OpenSUSE install Netease cloud music (tumblefeed) (LEAP)

预测销售XGBoost
随机推荐
Spark3.x entry to mastery - stage 7 (spark dynamic resource allocation)
Solution to the conflict between security automatic login and anti CSRF attack
CAN FD如何应用Vector诊断工具链?
day01(Flume)
Maxwell简介&使用
Network knowledge-05 transport layer UDP
Telnet installation
How to output a digital diamond with a for loop
How can FD apply the vector diagnostic tool chain?
面部关键点检测-CNN
Review of 4246 Algorithms for Data Science
Spark3.x entry to proficiency - stage 3 (in-depth analysis of the whole process of spark data processing)
Review - 5703 Statistical Inference and Modeling
MySQL 02 function substr mod view view
卷积神经网络CNN
泰坦尼克号乘客获救预测(进阶)
JS does not use async/await to solve the problem of data asynchrony / synchronization
TSN协议之安全协议(802.1Qci)的那些事儿
Promote trust in the digital world
Divide method in BigDecimal