现在的情况是:
我定时访问一个接口,这个接口需要我传递一个ID,请问有没有什么方法能做到。Timer的schedule这个方法不行啊。有没有其它办法。
急在线等。
我定时访问一个接口,这个接口需要我传递一个ID,请问有没有什么方法能做到。Timer的schedule这个方法不行啊。有没有其它办法。
急在线等。
解决方案 »
- 请问什么叫引用传递,什么叫值传递,java中有没有引用传递?
- 图片上传后不透明
- 求大神指教J2ee
- SOLR J 的分组查询老是报错!急
- HTTP Status 404 - result 'null' not found
- 如何遍历request.getParameterMap()里面的值。
- session bean 的local接口的錯誤調試
- 提问:SQLServer数据库转ORACLE,WebLogic7.01后台报错,到底是什么原因呢?
- 求助各位大狭,谢谢谢谢!
- 谁知道Tomcat4.1的系统用户名和密码?
- 有什么开源GIS可以实现根据经纬度定位,画线,画矩形等操作?
- 急求购物网需求分析一份
public class helloworld { public static void main(String[] args){
helloworld hw = new helloworld();
hw.tThread();
}
private void tThread(){
new Thread(new printThread()).start();
}
private class printThread implements Runnable{
public void run(){
while(true){
try{
Scanner input=new Scanner(System.in);
int x=input.nextInt();
tt(x);
Thread.sleep(5000);
}catch(Exception e){
e.printStackTrace();
}
}
}
private void tt(int i){
if(i== 0){
System.exit(0);
}
System.out.println("your enter number is:"+i);
}
}
}