GoConqr has a new look! Let us know what you think.

Mind map

Threads

Lorran Alves Java Portuguese

Threads

Map content

Threads

  1. Interface

    • Runnable
      • Reescrever o método run
        • Como deve executar, por exemplo quantidade de vezes que a thread vai executar
        • @Override public void run() { }
          • try { for (int i = 0; i < 5; i++) { System.out.println(palavra); Thread.sleep(tempo); } } catch (InterruptedException e) { e.printStackTrace(); }
    • No método main
      • Runnable ping = new RunnableThread("Ping",1500 ); Runnable pong = new RunnableThread("Pong",2000 );
        • Start da Thread
          • new Thread(ping).start(); new Thread(pong).start();
        • Criar construtor da classe em questão.

Images and files in the map

  • Threads
  • Threads

Information

Description
Como funciona as threads no Java.
Created by
Lorran Alves
Views
39
Tags
java
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?