Skip to content

Instantly share code, notes, and snippets.

View Noman5237's full-sized avatar

Md Abdullah Al Noman Noman5237

  • 18:26 (UTC +06:00)
View GitHub Profile
@Noman5237
Noman5237 / MultiThreadedPrintInOrder.java
Last active November 7, 2021 06:52
Print in Order Multithreaded
import java.util.concurrent.atomic.AtomicInteger;
class Foo {
public void first() {
System.out.println("first");
}
public void second() {
System.out.println("second");
}
@Noman5237
Noman5237 / MultiThreadedFizzBuzz.java
Last active November 7, 2021 06:53
Multithreaded Fizzbuzz
import java.util.Scanner;
import java.util.concurrent.atomic.AtomicInteger;
public class FizzBuzz {
public static void main(String[] args) {
AtomicInteger counter = new AtomicInteger(1);
System.out.print("Please enter the upper limit: ");
int limit = new Scanner(System.in).nextInt();