top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

How to call a Java class from a background thread

+3 votes
48 views

I need to call this class from a background thread.

ChartPenData.main(arguments);

How can I do that?

Thread thread = new Thread();
thread = ChartPenData.main(arguments);
thread.run();
posted Apr 20, 2016 by Karthick.c

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Instead of creating thread from Class you can do this,

Thread myThread = new Thread() {
   public void run() {
      ChartPenData.main(arguments);
   }
};
myThread.start();
answer May 23, 2016 by Vinod Kumar K V
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...