java如何获取系统当前时间

java获取系统当前时间的方法:获得当前时间和当前时间前30秒时间,代码为【SimpleDateFormat df = new SimpleDateFormat(“yyyy-MM-dd HH:mm:ss”);】。本教程操作环境:windows7系统、java10版,该方法适用于所有品牌电脑。java获取系统当前时间的方法:import org.junit.Test;

java如何获取系统当前时间

float totalPrice=price*itemNum;