Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class thread_example1 implements Runnable {
- @Override
- public void run() {
- }
- public static void main(String[] args) {
- Thread guruthread1 = new Thread();
- guruthread1.start();
- try {
- guruthread1.sleep(1000);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- guruthread1.setPriority(1);
- int gurupriority = guruthread1.getPriority();
- System.out.println(gurupriority);
- System.out.println("Thread Running");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment