摘要: 在网上看到的最常见的方式有:public static void main(String[] args) throws Exception {URL url=new URL("http://www.bjtime.cn");//取得资源对象URLConnection uc=url.openConnection();//生成连接对象uc.connect(); //发出连接long ld=uc.getDate(); //取得网站日期时间Date date=new Date(ld); //转换为标准时间对象//分别取得时间中的小时,分钟和秒,并输出System.out.print( 阅读全文
posted @ 2013-05-10 09:04 hnrainll 阅读(22211) 评论(1) 推荐(0) 编辑