当前位置:网站首页>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
边栏推荐
- PyMOL usage
- Why is bi so important to enterprises?
- 12. < tag linked list and common test site synthesis > - lt.234 palindrome linked list
- Problem B: small challenge
- Detailed description of MySQL index [B + tree index, hash index, full-text index, overlay index]
- Cefsharp stores cookies and reads cookies
- Use of ADB command [1]
- Unity knowledge points (ugui)
- Problem a: face recognition
- Problem C: realize Joseph Ring with linked list
猜你喜欢

浅学一下I/O流和File类文件操作

Visual programming - drawing assignment

移植tslib时ts_setup: No such file or directory、ts_open: No such file or director

淺學一下I/O流和File類文件操作
![General test technology [II] test method](/img/b7/f661f446616ad6bfbbf48eb03ea82d.png)
General test technology [II] test method

Node configuration environment CMD does not take effect

2022 团体程序设计天梯赛 模拟赛 L2-3 浪漫侧影 (25 分)

It can receive multiple data type parameters - variable parameters

12. < tag linked list and common test site synthesis > - lt.234 palindrome linked list

Visual programming -- how to customize the mouse cursor
随机推荐
Advanced sorting - fast sorting
Visual programming -- how to customize the mouse cursor
Chapter 9 of C language programming (fifth edition of Tan Haoqiang) analysis and answer of exercises for users to establish their own data types
Knowledge of software testing~
Unity games and related interview questions
C-10 program error correction (recursive function): number to character
Téléchargement en vrac de fichiers - téléchargement après compression
Code forces round # 784 (DIV. 4) solution (First AK CF (XD)
Optimization of especially slow startup in idea debugging mode
QT learning summary
PyMOL usage
MySQL之explain关键字详解
IDEA查看历史记录【文件历史和项目历史】
TCP three handshakes and four waves
打卡:4.22 C语言篇 -(1)初识C语言 - (11)指针
Course design of Database Principle -- material distribution management system
Seminar playback video: how to improve Jenkins' ability to become a real Devops platform
Experiment 6 input / output stream
How to achieve centralized management, flexible and efficient CI / CD online seminar highlights sharing
Log4net is in Net core usage