当前位置:网站首页>【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.可以通过一个语句来创建多个变量,但是一般情况下不推荐这么写

边栏推荐
猜你喜欢

MySql

Administrator blocked this app from running

This article introduces you to SOA interface testing

环境变量和文件夹放置位置

Spark3.x-实战之双流join(窗口和redis实现方式和模板代码)

AB Testing Review

What if Jenkins forgets his password?

Spark3.x入门到精通-阶段六(RDD高级算子详解&图解&shuffle调优)

express
![[quantitative notes] the meaning of relevant technical indicators of volatility](/img/e9/5d6cada39f6211a1eaf3fe31000c3e.png)
[quantitative notes] the meaning of relevant technical indicators of volatility
随机推荐
High concurrency day04 (Zab protocol, observer, NC, Avro, RPC)
六十、清除缓存
MySql02 函数substr mod 视图view
企业微信上的应用如何与门店的sybase数据库关联
正则表达示提取匹配内容
MongoDB的使用
Network knowledge-02 physical layer
Flink入门到实战-阶段三(DataStreamAPI)
Spark3.x entry to proficiency - stage 3 (in-depth analysis of the whole process of spark data processing)
TSN security protocol (802.1qci)
Gnome installs the extension (version 40.1, openSUSE tumblefeed).
59 get prototype size
Real time data warehouse - Design & Implementation of real-time data warehouse from 0 to 1 (sparkstreaming3.x)
Review of Linear Algebra
Xiaodi network security note information collection CDN bypass technology (7)
Introduction to 3D Visualization: see how rendering pipelines work in GPU
Hypothesis testing
Spark3.x源码编译
机器学习之随机森林
JS does not use async/await to solve the problem of data asynchrony / synchronization