JavaÖмÆÊ±Æ÷µÄʹÓÃ
import java.util.Timer;
import java.util.TimerTask;
public class TimerExample
{
/**
* JavaÖмÆÊ±Æ÷µÄʹÓÃ
* Time: 21:19 2010-1-5
*/
Timer localTimer;
public TimerExample(int seconds)
{
// Create local timer
localTimer = new Timer();
// Create local timer task and set the timer-parameter
localTimer.schedule(new LocalTimerTask(), 0, seconds * 1000);
}
class LocalTimerTask extends TimerTask
{
int bitTest = 0xFFFFFFFF;
int flag = 1;
int temp = bitTest;
// Override the abstract method of TimerTask
// The run() will be called every per timer
public void run()
{
if (temp < 0)
{
System.out.println(Integer.toBinaryString(temp));
temp = bitTest & (~flag);
flag <<= 1;
}
Ïà¹ØÎĵµ£º
File.separatorChar ·µ»ØÒ»¸ö×Ö·û£¬±íʾµ±Ç°ÏµÍ³Ä¬ÈϵÄÎļþÃû·Ö¸ô·û£¬ÔÚWindowsÖÐΪ"\",unixÖÐΪ"/"¡£
File.separator ÓëǰÕßÏàͬ£¬µ«½«·Ö¸ô·û×÷Ϊ×Ö·û´®ÀàÐÍ·µ»Ø¡£
pathSeparatorChar ·µ»ØÒ»¸ö×Ö·û£¬±íʾµ±Ç°ÏµÍ³Ä¬ÈϵÄ·¾¶Ãû·Ö¸ô·û£¬ÔÚWindowsÖÐΪ";",unixÖÐΪ":"¡£
File.pathSeparator ÓëǰÕßÏàͬ£¬µ«½«·Ö¸ô·û×÷Ϊ×Ö· ......
ǰЩʱºò£¬°Ñ¡¶Thinking in Java¡·ÖÐÒì³£ÕâÒ»Õ·³öÀ´ÔÙ´ÎÑжÁ£¬±¾ÈËÓÐЩÊÕ»ñ£¬²¢ÇÒÓÐЩ¹ÛµãºÍ×÷Õ߹۵㲻̫һÖ£¬¹²ÏíÖ®
1.Òì³£µÄ¶¨Òå
Ò»¸öϵͳÖж¨ÒåÒì³£Ó¦×ñÑÈçϼ¸¸öÔÔò£º
a. ϵͳÖÐÈç¹ûij¸öÄ£¿é¹¦ÄܱȽϵ¥Ò»£¬½¨Ò齫ËùÓÐÒì³£·ÅÔÚÒ»¸öpackageÄÚ£»Èç¹ûij¸öÄ£¿éÓкܶà×ÓÄ£¿é£¬ ......
Ò»¹²ÓÐÈý¸öÀࣺWriteFile ; ReadFile ; InsertDB ;
//WriteFile.java
//ÓÃÓÚ½«ÐÅϢдÈëÎı¾Îļþ
package org.mb.insertfromfile;
import java.io.*;
public class WriteFile{
private int count = 0 ;
public int getCount() {
return count;
}
public void setCount(int count) {
this.cou ......
1.[http://www.javaalmanac.com] – Java¿ª·¢ÕßÄê¼øÒ»ÊéµÄÔÚÏß°æ±¾. ÒªÏë¿ìËٲ鵽ijÖÖJava¼¼ÇɵÄÓ÷¨¼°Ê¾Àý´úÂë, ÕâÊÇÒ»¸ö²»´íµÄÈ¥´¦.
2.[http://www.onjava.com] – O’ReillyµÄJavaÍøÕ¾. ÿÖܶ¼ÓÐÐÂÎÄÕÂ.
3.[http://java.sun.com] – ¹Ù·½µÄJava¿ª·¢ÕßÍøÕ¾ – ÿÖܶ¼ÓÐÐÂÎÄÕ·¢±í.
4.[http ......