Share on Google+Share on Google+

java multithread
0 Answer(s)      7 years ago
Posted in : Java Beginners
Thanks for your multithreading java code. It helped me a lot.
But i have one issue. My code is look like this.

public class classname extends Thread {

public classname() {
/**Here creating objects for other classes and calling those methods
classC ob3=new classC();
classD ob4=new classD();

public void run() {
while (true) {

/** code something like this**/
classA ob1=new classA();
classB ob2=new classB();

try {

//900000 milliseconds equals to 15 minutes
} catch (Exception e) {


I want two objects i.e ob1 and ob2 as two diferent threads and should run simultaneously without affecting each other.

Could you please help me out.
Thank you


View Answers

Related Tutorials/Questions & Answers:
Java Multithread
Java Multithread  Hi All. I am trying to make a program in Java that uses Multithread. That program is about a bank account shared between husband and wife who use debit cards. I wrote the Java program using 2 threads but i am
Java MultiThread - Java Beginners
Java MultiThread  what is the meaning of standalone application in multithread.How can we write multi programms in multithread process and execution...."); } } ----------------------------------------------------- Visit for more information.
java multithread - Java Beginners
java multithread  Hi, I have developed one java application.It should be running continuously. Using multithreads how to make the application to run continuously. Could you please help me. Thank you,  Hi Friend
java multithread - Java Beginners
java multithread  Hi, Thanks for your multithreading java code. It helped me a lot. But i have one issue. My code is look like this. public class classname extends Thread { public classname() { super
java multithread - Development process
java multithread  sir i am send it again sir.please reply me sir.Develop multi-threaded echo server and a corresponding GUI client in java.  Multi-threaded ECHO SERVER and GUI client program by Whitman Kumaresh for my
Java MultiThread
Java has multithreading feature. Multithreading feature is given by Thread class and Runnable interface Java Multithreading allows to run multiple tasks(threads) at a time. Java Multi Thread Example public class multi
Multithreading ? - Java Interview Questions
Multithreading ?   Hi Friends, I am new to java , am not clear with Multithreading. Multithread will cause deadlock. We can... program. For read more information on Multithread visit to : http
Java Interview Questions - Page 5
Java Interview Questions - Page 5       Question: How to create multithread in a program... to start the thread. Question: Can Java object be locked down for exclusive
New to Java programming
Programming Multithread Programming Java Applets Java Web Applications...I am new to Java, how I can learn Java programming Language? Java... Application. So, first thing in learning the Java programming language is to learn
Java Exception - Handle Exceptions in Java
Java Exception - Handle Exceptions in Java       What is Exception in Java? How to handle the Exceptions in Java programming language. This section on exception
Java Exception Thread
Java Exception Thread     ... the program. Many Thread run concurrently in the program. Multithread are those...,the thread run concurently,synchronous or asynchronous. Advantage of Multithread
java  diff bt core java and java
java  what is java
Java   Whether Java is pure object oriented Language
java  different between java & core java
java  explain technologies are used in java now days and structure java
java   why iterator in java if we for loop
JAVA  how the name came for java language as "JAVA
java  what is java reflection
java  is java open source
what is the size of array in java ?  what is the size of array in java ? what is the mean of finalize in java
java   in java does not pointers concept but what is nullpointers in java?   nullpointer is a runtime Exception
java  write a java program using filenotfoundexception
Java  how to draw class diagrams in java
java   difference between class and interface
java  why multiple inheritance is not possible in java
java  explain object oriented concept in java
java  is java purely object oriented language
Java   Whether Java is Programming Language or it is SOftware
java  what are JAVA applications development tools
java  how use java method
Java Spring Hibernate Struts Training What does core Java include? java What are some way to learn Java quickly? Is it required to learn Java before learning Java Script? Is it necessary to learn java script before learning PHP? Are HTML5 and Java Script boosts Java career? Is Java object oriented? Fingerprint application with Java Uninstall Oracle Virtual Box JSON to HashMap Free Java online Training I want example of Control Statement in Java ANSI Color Codes with Python Create a Program that Calculates Input What is difference between JDK,JRE and JVM? How to see ubuntu version on server? How to get Page Source in Selenium (WebDriver) using Java? The path to the driver executable must be set by the webdriver.gecko.driver system property parse data from a link in java Java Program Qns using BlueJ How to fix HAX Kernel Module Is Not Installed error? Installing Audacity Looking for code Logic to check track changes & Coments in MSWord, MSWordx, MSExcel, MSExcelx is ON/OFF Installing JDK on Mac SAX Parser exception ERROR 601 (42P00): Syntax error. Encountered Thread java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory How to install Ubuntu 16.04 LTS? HttpServletRequest cannot be resolved to a type in eclipse - Solved Unhandled event loop exception GC overhead limit exceeded Spring Data jpa with apache phoenix Caused by: java.lang.IllegalArgumentException: Not a host:port pair: PBUF o.a.h.h.z.RecoverableZooKeeper - Possibly transient ZooKeeper, quorum= com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager class not found com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager not found How to download and install Java 8 on Windows? How to uninstall JDK 7? How to install gtk-doc-tools package in Ubuntu? How to install Oracle JDK 8 on Ubuntu? ejabberd_ctl.beam not found - Solved How to convert date to UTC format in Java? How to install autoconf, automake and libtool in Ubuntu 15.10? How to convert current date to mm dd yyyy format in Java? How to convert current date to dd mm yyyy format in Java? How to stop window closing in "internalFrameClosing" event. How to find list of all index in Neo4j? file location SASLError using PLAIN: not-authorized how to convert war file into .exe file using java code


Advertisement null