当前位置:网站首页>Variable definition and use
Variable definition and use
2022-04-23 03:28:00 【Aiyou coffee】
Overview of variables :
Definition of variables : While the program is running , The amount of value that can change .
Variables are essentially a small area of memory .
Variable The definition of :
Variables are defined by variable names , data type , The variable value consists of three parts .
So the format is : data type Variable name = A variable's value :
for example int a = 3;
Use of variables :
Modify the format : Variable name = A variable's value
public class variable{
public static void main (String []args){
// Define a variable
int a = 1:
// Output
System.out.println(a);
// Modify variables
a =23;
// Once again, the output
System.out.println(a);
}
}
This is the process of defining and modifying variables .
matters needing attention :
1. The name cannot be repeated
2. You can't use variables without assignment
3.long When a type is defined, it should be followed by an uppercase L
4.float Type to prevent incompatibility , So add... After it F
版权声明
本文为[Aiyou coffee]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220619009371.html
边栏推荐
- 关于idea调试模式下启动特别慢的优化
- "Visual programming" test paper
- Use of ADB command [1]
- Batch download of files ---- compressed and then downloaded
- oracle 查询外键含有逗号分隔的数据
- 12. < tag linked list and common test site synthesis > - lt.234 palindrome linked list
- 2022 团体程序设计天梯赛 模拟赛 1-8 均是素数 (20 分)
- 第四次作业
- Detailed explanation of socket programming send() and recv() functions
- Problem B: small challenge
猜你喜欢
Section 1 array and slicing in Chapter 6
Huawei mobile ADB devices connection device is empty
2022 group programming ladder game simulation L2-4 Zhezhi game (25 points)
Database - MySQL -- Navicat import SQL error 1067 - invalid default value for 'paydate‘
PyMOL usage
C set
Eight elder brothers chronicle [4]
AWS from entry to actual combat: creating accounts
淺學一下I/O流和File類文件操作
When migrating tslib_ setup: No such file or directory、ts_ open: No such file or director
随机推荐
Utgard connection opcserver reported an error caused by: org jinterop. dcom. common. JIRuntimeException: Access is denied. [0x800
Talent Plan 学习营初体验:交流+坚持 开源协作课程学习的不二路径
超好用的Excel异步导出功能
JS, bind the event for a label with input, and then bind the stand-alone event in the parent element. The event is executed twice and solved
QT uses drag and drop picture to control and mouse to move picture
Eight elder brothers chronicle [4]
File upload vulnerability summary and upload labs shooting range documentary
C-10 program error correction (recursive function): number to character
How to achieve centralized management, flexible and efficient CI / CD online seminar highlights sharing
Comprehensive calculation of employee information
月薪10k-20k都无法回答的事务问题,你会吗?
Téléchargement en vrac de fichiers - téléchargement après compression
Applet - canvas drawing Poster
Can you answer the questions that cannot be answered with a monthly salary of 10k-20k?
Charles uses three ways to modify requests and responses
Visual programming - Experiment 1
2022 group programming ladder simulation l2-1 blind box packaging line (25 points)
Unity knowledge points (common core classes)
Cefsharp stores cookies and reads cookies
Knowledge of software testing~