import java.util.Scanner; public class Main { public static void main(String[] args) { // Threading = Allows a program to run multiple tasks simultaneously // Helps improve performance with time-consuming operations // (File I/O, network communications, or any background tasks) // How to create a Thread // Option 1. Extend the Thread class (simpler) // Option 2. Implement the Runnable interface (better) Scanner scanner = new Scanner(System.in); MyRunnable myRunnable = new MyRunnable(); Thread thread = new Thread(myRunnable); thread.setDaemon(true); // This thread will end when Main thread finishes thread.start(); System.out.println("You have 10 seconds to enter your name"); System.out.print("Enter your name: "); String name = scanner.nextLine(); System.out.println("Hello " + name); scanner.close(); } } public class MyRunnable implements Runnable{ @Override public void run(){ for(int i = 1; i
@Sviatoslav-Gamer18 күн бұрын
Hey bro! Just wanted to say thanks for all the hard work - you're a pro, and your efforts are really respected. How about making an updated JavaFX course with real-world projects? This could be a practical guide to mastering JavaFX, with everything from basic UIs to more complex apps. Throw in animated UIs, event handling, and library integrations to show off the full power of JavaFX. I know you’ll nail it, and this course will be a great addition to your already impressive work. Thanks again, bro, can’t wait to see it!
@AymanIbrahim-g7g19 күн бұрын
Best teacher ❤
@azharalibhutto120911 күн бұрын
Great ❤❤❤ bro
@AlirezaR519 күн бұрын
I miss the old Bro who used to say: So sit back, realx, and enjoy the show ! :(
@marcinzale19 күн бұрын
Great explanation.
@TherealShacharTs19 күн бұрын
A real bro is before 500 views
@FromTheWombTotheGrave19 күн бұрын
Can you make a course for python AI learning? Like creating AI applications using LLMs, lang chain,rag