当前位置:网站首页>进制与转换、关键字
进制与转换、关键字
2022-08-01 10:13:00 【菜鸟教程*…*】
进制与转换
计算机进制通常有:十进制、二进制、八进制、十六进制
short s1=10;
int s2 = s1+1;//要转换成int类型才可以
System.out.println(s2);
//byte short int 在计算时会自动转换为int类型
short s1=10;
s1=(short)(s1+b);
System.out.println(s1);
//把大的容量类型转换为小的容量类型,需要添加强制类型转换,有可能造成精度的降低或数据溢出,使用时要小心
int x =
关键字

转义字符

//转义字符;用于转义的符号是:\
public class Test4{
public static void main(String[] args){
System.out.print("转义字符测试");
System.out.print("我想输出一个回车符\n\r");
System.out.print("\t这是一个制表符");
System.out.print("\\");
System.out.print("\"双引号\"");
System.out.print("\'单引号\'")
}
}
边栏推荐
- 微信公众号授权登录后报redirect_uri参数错误的问题
- cisco交换机基本配置命令(华为交换机保存命令是什么)
- What is a stepper motor?40 pictures to show you!
- redis
- Golang内存分析工具gctrace和pprof实战
- 2022年7月31日--使用C#迈出第一步--使用C#中的数组和foreach语句来存储和循环访问数据序列
- AI篮球裁判火了,走步算得特别准,就问哈登慌不慌
- SAP ABAP OData 服务如何支持 $orderby (排序)操作试读版
- C#/VB.NET 将PPT或PPTX转换为图像
- The first experience of Shengsi large model experience platform——Take the small model LeNet as an example
猜你喜欢

CTO strongly banning the use of the Calendar, that in what?

Change Servlet project to SSM project

使用ESP32驱动QMA7981读取三轴加速度(带例程)

Comprehensive experiment BGP

Custom Types - Enums, Unions

Visualization - Superset installation and deployment

Opencv creates a window - cv.namedWindow()
退役划水

CTFshow,命令执行:web33

Qt supports HEIC/HEIF format images
随机推荐
CTFshow,命令执行:web34、35、36
CTO strongly banning the use of the Calendar, that in what?
Py之yellowbrick:yellowbrick的简介、安装、使用方法之详细攻略
Generate certificates using KeyStore
如何在IntellJ IDEA中批量修改文件换行符
机器学习 | MATLAB实现支持向量机回归RegressionSVM参数设定
AC与瘦AP的WLAN组网实验
The first experience of Shengsi large model experience platform——Take the small model LeNet as an example
2022年7月31日--使用C#迈出第一步--使用C#中的数组和foreach语句来存储和循环访问数据序列
WPF 截图控件之绘制箭头(五)「仿微信」
PDMan-domestic free general database modeling tool (minimalist, beautiful)
ModelArts-based object detection YOLOv3 practice [play with HUAWEI CLOUD]
【cartographer ros】十: 延时和误差分析
CTFshow,命令执行:web37
C语言小游戏——扫雷
For small applications, which database is better to use?
STM32 Personal Notes - Watchdog
可视化——Superset安装与部署
Custom Types - Enums, Unions
JWT