当前位置:网站首页>Chang Wei (variables and constants) is easy to understand
Chang Wei (variables and constants) is easy to understand
2022-06-25 07:15:00 【Python's path to becoming a God】
Distinguishing statement
Generally will 1,2,3,'a','b',true,false,''helloWorld'' Such as character constants
Use final Embellished PI Is a symbolic constant .
Variable and constant naming specification
* You can't call names blind , You have to see what it means
* Class member variable : The first letter is lowercase or hump principle :monthSalary
* local variable : The first letter is lowercase or hump principle
* Constant : Capital letters and underscores :MAX_VALUE
* Class name : The starting letter is capitalized or humped :Man,GoodMan
* Method name : Capital letters or hump rules :run(),runRun()
public class TestConstant{
public static vois main(String[] args){
final double PI =3.14;
final int MAX_SPEED = 120;// Constant naming ; All in capital letters , Underline the words
int r =4;
double area = PI*r*r;
double circle = 2*PI*r;
System.oub.println(" The area is :"+area);
System.out.println(" The circumference is :"+cirxle);
}
}边栏推荐
- Qcom--lk phase I2C interface configuration scheme -i2c6
- 3632. Binary sum
- Non-contact infrared temperature measurement system for human body based on single chip microcomputer
- How do I get red green blue (RGB) and alpha back from a UIColor object?
- The significance and proof of weak large number theorem
- 5g private network market is in full swing, and it is crucial to solve deployment difficulties in 2022
- Following the last minor upgrade of nodemcu (esp8266)
- Kubernetes 集群中流量暴露的几种方案
- Esp8266 & sg90 steering gear & Lighting Technology & Arduino
- Error reported during vivado simulation common 17-39
猜你喜欢

Message queue table structure for storing message data

The king scheme in distributed locks - redisson

Debug through yalc before releasing NPM package

Love Terminator

StreamNative Platform 1.5 版本发布,集成 Istio、支持 OpenShift 部署

【他字字不提爱,却句句都是爱】

What is the real future of hardware engineers?
![[Shangshui Shuo series] day 5](/img/83/28834addd8198d4bcdc718eccf5754.png)
[Shangshui Shuo series] day 5

活动报名|Apache Pulsar x KubeSphere 在线 Meetup 火热来袭

父爱的表达方式
随机推荐
Don't you know the evolution process and principle of such a comprehensive redis cluster model?
lotus v1.16.0-rc3 calibnet
太美的承诺因为太年轻
父爱的表达方式
Solar orbiter captured the full picture of the largest prominence eruption in history
Non-contact infrared temperature measurement system for human body based on single chip microcomputer
Expression of fatherly love
Operate cnblogs metaweblog API
Navicat prevent new query from being deleted by mistake
Why is true == "true" true in R- Why TRUE == “TRUE” is TRUE in R?
The Rust Programming Language
Is it possible to use Jasmine's toHaveBeenCalledWith matcher with a regular expression?
How to find happiness in programming and get lasting motivation?
Understand ZBrush carving software and game modeling analysis
Keil debug view variable prompt not in scope
网络是怎样连接的?
Icon already includes gloss effects
100 times larger than the Milky way, Dutch astronomers found mysterious objects in deep space
48 张图 | 手摸手教你微服务的性能监控、压测和调优
【xxl-job】池塘水绿风微暖,记得玉真初见面