• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

simple program scenario that can be done concurrently

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1- How to make a sequence data using thread? or perhaps that is just a waste?
2- can you give me some example on a simple program scenarios that can be done concurrently

please do help me. im still new
 
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

asparagus white wrote:1- How to make a sequence data using thread? or perhaps that is just a waste?



No idea what you mean.

2- can you give me some example on a simple program scenarios that can be done concurrently



Did it not occur to you to SearchFirst?(⇐click)

java concurrent example(⇐click)
 
Sara Brown
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what i meant to say is if i want to print all the even numbers between 0 to 100, can we make it to thread?

i really dont have any idea with thread
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

asparagus white wrote:what i meant to say is if i want to print all the even numbers between 0 to 100, can we make it to thread?



Anything can be done with multiple threads. But some tasks benefit more than others from multithreading. And some tasks may actually perform more slowly with multiple threads.

i really dont have any idea with thread



Then you should google for java multithreading tutorial, and/or check out Doug Lea's or Brian Goetz's book.
 
You can thank my dental hygienist for my untimely aliveness. So tiny:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic