当前位置:网站首页>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
边栏推荐
- [vs Code] solve the problem that the jupyter file displays exceptions in vs code
- 7-3 poly width
- Generate QR code through zxing
- socket编程 send()与 recv()函数详解
- QT dynamic translation of Chinese and English languages
- Supersocket is Use in net5 - concept
- Applet - WXS
- Translation of l1-7 matrix columns in 2022 group programming ladder Simulation Competition (20 points)
- Applet - canvas drawing Poster
- It can receive multiple data type parameters - variable parameters
猜你喜欢
![Detailed description of MySQL index [B + tree index, hash index, full-text index, overlay index]](/img/1a/a22b4a35d3c083438d0f766a5ecb08.png)
Detailed description of MySQL index [B + tree index, hash index, full-text index, overlay index]

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

Using swagger in. Net5

Visual programming -- how to customize the mouse cursor

Build websocket server in. Net5 webapi

Code forces round # 784 (DIV. 4) solution (First AK CF (XD)

Punch in: 4.22 C language chapter - (1) first knowledge of C language - (11) pointer

Database SQL -- simulate inserting a large amount of data, importing / exporting database scripts, timestamp conversion and database basics

. net webapi access authorization mechanism and process design (header token + redis)

7-1 introduction to finance
随机推荐
Unity knowledge points (ugui 2)
General test technology [II] test method
Talent Plan 学习营初体验:交流+坚持 开源协作课程学习的不二路径
JS calculates the display date according to the time
2022 团体程序设计天梯赛 模拟赛 L2-1 盲盒包装流水线 (25 分)
MySQL query specifies that a row is sorted to the first row
通过 zxing 生成二维码
Test questions (2)
When migrating tslib_ setup: No such file or directory、ts_ open: No such file or director
打卡:4.22 C语言篇 -(1)初识C语言 - (11)指针
Applet - WXS
超好用的Excel异步导出功能
Redis(17) -- Redis缓存相关问题解决
Codeforces Round #784 (Div. 4)题解 (第一次AK cf (XD
Learn about I / O flow and file operations
Super easy to use [general excel import function]
Database - MySQL -- Navicat import SQL error 1067 - invalid default value for 'paydate‘
7-3 poly width
Batch download of files ---- compressed and then downloaded
Visual programming -- how to customize the mouse cursor