Write a JAVA program which will create two child threads by implementing Runnable interface; one thread will print even nos from 1 to 50 and other display vowels

import java.io.*;
class x1 extends Thread

{
 public void run()
 {
   for(int i=1;i<=50;i++)
{
 if(i%2==0)
System.out.println("even no" +i);
}
}
}

class x2 implements Runnable
{
 public void run()
{
   try

{
BufferedReader br=new BufferedReader(new

InputStreamReader(System.in));
System.out.println("Enter the string");
String data=br.readLine();
int n1=data.length();
char p[]=data.toCharArray();
System.out.println("vowel is");
for(int i=0;i<n1;i++)
{
if(p[i]=='a'|| p[i]=='e'|| p[i]=='i'|| p[i]=='o'|| 

p[i]=='u')
 System.out.println(p[i]);
}
}
catch(Exception e)
{
}

}
}

class s17
{
public static void main(String args[])
{
try
{
 x1 runnable=new x1();
Thread tx1=new Thread(runnable);
tx1.start();
tx1.sleep(50);

 x2 runnable1=new x2();
Thread  tx2=new Thread(runnable);
//x2.data=argv[i];
tx2.start();
}
catch(Exception e)
{
}

}
}

output:-


D:\5242>java s17
even no2
even no4
even no6
even no8
even no10
even no12
even no14
even no16
even no18
even no20
even no22
even no24
even no26
even no28
even no30
even no32
even no34
even no36
even no38
even no40
even no42
even no44
even no46
even no48
even no50
even no2
even no4
even no6
even no8
even no10
even no12
even no14
even no16
even no18
even no20
even no22
even no24
even no26
even no28
even no30
even no32
even no34
even no36
even no38
even no40
even no42
even no44
even no46
even no48
even no50

30 comments:

  1. Thanks for Sharing this valuble information and itis useful for me and ADV JAVA learners.We also provides the best Online ADV JAVA Training classes.

    ReplyDelete
  2. Your support for advance java learners was really a respectable one and to learn Advance Java Online Training contact at
    India : +91 9949599844
    US : + 1-347-606-2716
    Email:contact@smartmindonlinetraining.com

    ReplyDelete
  3. It is Very useful for online learners
    Java Online Training

    ReplyDelete

  4. thanks for sharing article on advanced java Programmes for beginners
    I really enjoyed it while reading
    follow:
    http://www.exltech.in/java-training.html

    ReplyDelete
  5. include specialized features for accountants also. You can simply all from theQuickBooks Payroll Support Phone Number for more information details. Let’s see many of your choices that come with QuickBooks which includes made the QuickBooks payroll service a big success.

    ReplyDelete
  6. QuickBooks Enterprise Tech Support Number is successfully delivering the whole world class technical assistance for QuickBooks Enterprise at comfort of your house. We understand your growing business need and that's the key reason why we provide simply the best. We make sure to give worth of every penny by giving the customer friendly tech support team services that include.

    ReplyDelete
  7. Our QuickBooks enhanced payroll support will help you to stand in an aggressive market. Intuit Payroll on the internet is among the advanced competitive accounting software. Being occupied with several advanced functions, in the event that you will contact QuickBooks support to run this impressive software, you can smoothly increase your business with no technical issue. To obtain the QuickBooks support, it is possible to contact our QuickBooks Payroll Support Number.

    ReplyDelete
  8. While installing QuickBooks Pro at multiple computer systems or laptops, certain bugs shall disturb the original set up process. This installation related problem can be solved by letting the executives that are handling the Intuit QuickBooks Phone Number understand the details related to your license therefore the date of purchase of the product to instantly solve the put up related issue.

    ReplyDelete
  9. You might have trapped into a problem with Intuit product and payroll services? You're going to be ready to understand the best approach to get your hands on the customer support team. QuickBooks Payroll Technical Support Phone Number welcome you 24*7 to access the various support services of Intuit products asking for help.

    ReplyDelete
  10. No matter whether you're getting performance errors or perhaps you are facing any type of trouble to upgrade your software to its latest version, you are able to quickly get advice about QuickBooks Tech Support Number.

    ReplyDelete
  11. QuickBooks accounting software program is integrated with various items like QuickBooks Enterprise(produced by Intuit) and tools like QuickBooks file doctor. Plus it offers a number of incredible features (Business plans, cash flow projections, and advanced inventory ) that make it unique from other Quickbooks product. It is really most suitable for small to medium businesses though it really is incredibly expensive. Without doubt, this has good compatibility with virtually every form of Windows OS, Mac OS, iOS, and Android. Yet you may possibly require an efficient QuickBooks Enterprise Support to address payroll management, account management, inventory, along with other accounting activities. AccountWizy provides you a perfect and efficient QuickBooks Enterprise Support Number US to really make it all possible.

    ReplyDelete
  12. Enterprise And As A Consequence Errors And Problems Related To It Could Be Often Seen. These Problems And Troubleshooted By The Expert And Technical Team Of QuickBooks Enterprise Support Can Be Used To Contact.

    ReplyDelete

  13. If you’re looking for small-business accounting solutions, initial thing experts and happy costumers will recommend you is QuickBooks by Intuit Inc. Intuit’s products for construction contractors through the Quickbooks Pro, Simple Start Plus Pack, Quickbooks Premier Contractor, and QuickBooks Technical Support Number .

    ReplyDelete
  14. Any QuickBooks Technical Support Phone Number user faces any type of identified errors in their daily accounting routine; these errors can vary from 1 another to a large degree, so our dedicated QuickBooks Customer Service Pro-Advisors are very well built with their tools and expertise to present most effective resolutions right away to the customers.

    ReplyDelete


  15. Get prominent solutions for QuickBooks near! Without having any doubts, QuickBooks Support Number has revolutionized the process of doing accounting that is the core strength for large in addition to small-sized businesses.

    ReplyDelete
  16. It really is an excellent to deal for the money, as it seriously functions as an important tool for managing the accounts and finance. Desperate to know more about any of it? Then you can take assistance from professionals at Intuit QuickBooks Support Number that could give you accredited information.

    ReplyDelete
  17. Nowadays accounting has exploded to become everyone’s cup of tea and that’s only become possible because because of the birth of QuickBooks Tech Support Phone Number accounting software.

    ReplyDelete
  18. QuicKbooks Tech Support Phone Number In today’s scenario individuals have got really busy inside their lives and work. They want to grow and learn as many new things as they possibly can. This drive has initiated a feeling of awareness amongst individuals and thus they find approaches to invent alternatives for daily tasks.

    ReplyDelete
  19. Craftsmen also deal with your variety of revenue. Sometimes you don't forecast the precise budget. We've got experienced people to offer the figure. We're going to also provide you with the figure of your respective budget which you can be in the near future from now. This is only possible with QuickBooks Tech Support Number.

    ReplyDelete
  20. Consist of a beautiful bunch of accounting versions, viz., QuickBooks Pro, QuickBooks Premier, QuickBooks Enterprise, QuickBooks POS, QuickBooks Support, QuickBooks Windows, and QuickBooks Payroll, QuickBooks has grown to become a dependable accounting software that one may tailor depending on your industry prerequisite.

    ReplyDelete
  21. So, there is no point in wasting some time, getting worried when it comes to problem you will be facing and so forth. Just call QuickBooks Technical Support Number and you will get instant respite from the problem caused by various QuickBooks errors.

    ReplyDelete
  22. QuickBooks Tech Support Number is accounting software, which can be a cloud-based application manufactured by Inuit Inc. In fact, the software has been developed utilizing the intention of keeping a safe record of financial needs regarding the business. Additionally, it really is a user-friendly accounting software; simple to maintain; assisting the business in keeping the records of financial transactions, and so many more features.

    ReplyDelete
  23. Now You are well conscious of advantages of QuickBooks online payroll in your company accounting but since this premium software contains enhanced functions to help you with your accounting task to accomplish, so you might face some technical errors while using QuickBooks Payroll Technical Support Phone Number solution.

    ReplyDelete
  24. In conclusion, don’t hesitate to call us on our QuickBooks Online Help Number. We have been surely here for you personally. In conclusion, any error, any problem, any bug or whatever else pertaining to QuickBooks related problem, just call our QuickBooks Tech Support.

    ReplyDelete
  25. Hopefully, you understand the concept well by know and know how to take care of this error. He steps will help to fix the problem efficiently. If you would like to learn How To Fix Quickbooks Error 9999, you can continue reading this blog.

    ReplyDelete
  26. Nice Blog. Thanks for sharing this article with us. Keep sharing in future.
    Do you want to be a JAVA Course?

    JAVA Course

    ReplyDelete