Home > Back-end >  Pray down: write a Java code examples, how to implement occupy CPU100 %, how to achieve 100% memory?
Pray down: write a Java code examples, how to implement occupy CPU100 %, how to achieve 100% memory?

Time:09-17

Java to write a piece of code examples, how to realize occupy CPU100 %, how to achieve 100% memory?

CodePudding user response:

Have a great god ah urgent

CodePudding user response:

Try to write a few more threads to let him spin

The run () {

For (;; ) {}

}

CodePudding user response:

Upstairs for loop when there will be at the end of the cycle to
While (true) {
}
Thank you for a few,

CodePudding user response:

 
IntStream. Range (0, 8)
The parallel ()
The forEach (x & gt; {
While (true) {}
});

I would have written computer eight nuclear 8 change myself

CodePudding user response:

The CPU is processing, more than a few dead circulation should be able to,
Memory is the capacity, read large files should be able to fill the,
  • Related