`
njsteven2010
  • 浏览: 4319 次
  • 性别: Icon_minigender_1
  • 来自: 南京
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论
文章列表
24小时制时间显示: public class Datetime { public static void main(String args[]){ java.util.Date current=new java.util.Date(); java.text.SimpleDateFormat sdf=new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String c=sdf.format(curren ...
import java.text.DecimalFormat; public class Exec { public static void main(String[] args) { Clock c1 = null; try { c1 = new Clock(18, 4, 14); } catch (Exception e) { e.printStackTrace(); c1 = new Clock(); } System.out.println(c1.toString()); } } class Clock ...
public class Exec { public static void main(String[] args) { Book b1 = new Book(); System.out.println("当前有" + Book.counter + "个对象"); Book b2 = new Book(); System.out.println("当前有" + Book.counter + "个对象"); Book b3 = new Book(); System.out.pri ...
import java.text.DecimalFormat; public class Exec { public static void main(String[] args) { Customer c1 = new Customer(); System.out.println("客户ID: " + c1.getCustomerId()); Customer c2 = new Customer(); System.out.println("客户ID: " + c2.getCustomerId()); ...
import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.sql.Timestamp; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class Exec { public static void main(String[] args) { Calendar birthday = Calendar.getInstance(); ...
Global site tag (gtag.js) - Google Analytics