随笔分类 -  java基础

jdbc操作和开启事务
摘要:public static void test(){ //1.数据库驱动类名的字符串 String driver = "com.mysql.jdbc.Driver"; //2.用户名 String username = root; //3.密码 String password = "root"; / 阅读全文

posted @ 2021-03-05 21:58 想入围城的小码农 阅读(493) 评论(0) 推荐(0)

如何解决float和double精度丢失的问题
摘要:使用BigDecimal对象 public class test{ public static void main(String[] args){ System.out.println(0.11+2001299.32); BigDecimal bigDecimal1 = new BigDecimal 阅读全文

posted @ 2021-03-05 18:17 想入围城的小码农 阅读(143) 评论(0) 推荐(0)