如何检查一年中的月份是否为1月,它将查看数据库表,如果有12月(12)和年/去年,它将插入到该表中,如果没有
示例在这里,但它不起作用
SimpleDateFormat king = new SimpleDateFormat("MM");
String M = (king.format(new java.util.Date()));
String L = M;
if (L.equals(1)) {
// then it will check the database table if there is none
// if the rs.next is false then it will count and insert the last
// month and last year patient
} else() {
// if it is not Month of January then it will insert the last month this work
// for me but the other is not
} …Run Code Online (Sandbox Code Playgroud) java ×1