Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 4 13 - Multithreading/13.5 - Thread Priority/src/Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public static void main(String[] args) throws InterruptedException {
System.out.println("BYEEE IN BETWEEN"); // This won't be printed at the end because Main thread is idle and will execute this before only.
System.out.println("Is t1 alive: " + t1.isAlive());

t1.join(); // will wait for t1 to complete execution and join main thread
t2.join(); // will wait for t2 to complete execution and join main thread
t1.join(); // will wait for t1 to complete execution and join main thread
t2.join(); // will wait for t2 to complete execution and join main thread
System.out.println("BYEE AT THE END");

System.out.println("Is t1 alive: " + t1.isAlive());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ External Iterations (loop outside the object)
- for each loop
Internal Iterations (loop inside the object)
- forEach method
*/
*/

import java.util.Arrays;
import java.util.Iterator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Internal Iterations: (Stream API)
- just focus on what to do
*/
*/

import java.util.Arrays;
import java.util.List;
Expand All @@ -19,8 +19,8 @@ public static void main(String[] args) {

// We need to find the sum of all the values*2

int result = 0;
// 1) Using traditional for-each loop
int result = 0;
for (int value : values) {
result += value*2;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Changes in new DateTime API:
- new package time was created
- Date object only print Date now, and not Time to avoid confusion
*/
*/

import java.time.Instant;
import java.time.LocalDate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- returns byte value in the form of int in range 0 to 255
- that value is basically the ascii value of that character
- not efficient
*/
*/

public class Test {
public static void main(String[] args) throws Exception {
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.