yinkaiguo

1、字符串的格式化:impor Java.text.MessageFormat

实用:String info = MessageFormat.format("name:{n}+{n+10}",var1,...);

2、日期:Java.util.Date;

实用:根据指定的长整数创建日期对象:Date fix = new Date(long num); 

日期的格式化:import java.text.SimpleDateFormat;

SimpleDateFormat sdf = new  SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");

String time = sdf.format(now);

3、数学函数:

向下取整:Math.floor(double num);

强行取整进1:Math.ceil(double num); 如果为零不取。

乘方:Math.pow(double foot,double mi);

开方平方:Math.sqrt(double num)

4、调试工具

①控制台

②变量区(Variables)--在此区域右键“new Watch”,可以自定义表达式

③观察区 --”add to watches“

--持续跟新

分类:

技术点:

相关文章:

  • 2022-02-08
  • 2021-07-02
  • 2021-11-19
  • 2021-12-08
  • 2022-12-23
  • 2022-12-23
  • 2022-01-23
  • 2022-01-14
猜你喜欢
  • 2021-11-28
  • 2021-06-13
  • 2021-10-08
  • 2021-05-31
  • 2021-05-22
  • 2022-02-07
相关资源
相似解决方案