Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/multithreading/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
JavaME支持线程吗?_Java_Multithreading_Java Me - Fatal编程技术网

JavaME支持线程吗?

JavaME支持线程吗?,java,multithreading,java-me,Java,Multithreading,Java Me,JavaME支持线程吗?你能给我一个在另一个线程中执行函数的示例代码吗 是的。即使是最小连接限制设备配置。该页面有一个示例,您在桌面上找到的一些示例也适用。如果您指的是J2ME,那么它确实支持线程。看一篇文章。 示例: public class DoAnotherThing extends Thread { public void run(){ // here is where you do something } } 然后像这样运行它: DoAnotherThing

JavaME支持线程吗?你能给我一个在另一个线程中执行函数的示例代码吗

是的。即使是最小连接限制设备配置。该页面有一个示例,您在桌面上找到的一些示例也适用。

如果您指的是J2ME,那么它确实支持线程。看一篇文章。

示例:

public class DoAnotherThing extends Thread {
    public void run(){
    // here is where you do something
    }
}
然后像这样运行它:

DoAnotherThing doIt = new DoAnotherThing();
doIt.start();

我可以在'DoAnotherThing'类中使用另一个名为'XYZ()'的函数吗。如何启动线程并调用函数。@毗瑟奴:看看这些线程:和。也许这些会有帮助。