• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Create Multiple Instances At A Time

 
Ranch Hand
Posts: 117
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


for the above code, I have the foollowing instantiations :



If the above statemements st 1, st 2, st 3, st 4 have to be executed all at the same time , how to do it without using threads because even with threads, there can be a small delay of few milliseconds. So without theading, all the above 4 statements have to be execeuted all at the same time . How can this be achieved without using concept of threads ?



 
Saloon Keeper
Posts: 14010
315
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't.

Why do you need this?
 
Lilou Laure
Ranch Hand
Posts: 117
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was asked this question in an interview. I was asked to execute all the statements / create all those instances at the same time.
 
Ranch Hand
Posts: 239
12
Scala IntelliJ IDE Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Was the question stated exactly this way? The class names given don't even follow standard Java conventions. I'd personally avoid the company from here on out if that was an interview question given to me.
 
Lilou Laure
Ranch Hand
Posts: 117
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Scott Shipp wrote:Was the question stated exactly this way? The class names given don't even follow standard Java conventions. I'd personally avoid the company from here on out if that was an interview question given to me.



See don't see the conventions and all and decide about the company !  

The question is to execute all those statements at the same time.
 
Stephan van Hulst
Saloon Keeper
Posts: 14010
315
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The answer to the question is that it can't be done, on any machine, with any language. Anybody that depends on this behavior doesn't understand computers, or physics in general.
 
Lilou Laure
Ranch Hand
Posts: 117
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks all !  
 
reply
    Bookmark Topic Watch Topic
  • New Topic