null
US
Sign In
Sign Up for Free
Sign Up
We have detected that Javascript is not enabled in your browser. The dynamic nature of our site means that Javascript must be enabled to function properly. Please read our
terms and conditions
for more information.
Next up
Copy and Edit
You need to log in to complete this action!
Register for Free
7890535
Threads
Description
Como funciona as threads no Java.
No tags specified
java
java
Mind Map by
Lorran Alves
, updated more than 1 year ago
More
Less
Created by
Lorran Alves
almost 8 years ago
35
0
0
Resource summary
Threads
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.
Media attachments
9a0a922b-5b02-495e-9406-8631265a67cd (image/png)
24daf85c-db3f-44da-90cb-19b038f58408 (image/png)
Show full summary
Hide full summary
Want to create your own
Mind Maps
for
free
with GoConqr?
Learn more
.
Similar
Programação
Prepara Palhoça
Software
Yann Duarte Woldemar
Curso AlgaWorks - Angular, Rest,SpringBoot
Carlos Eduardo De Barros Souza
Oracle Certified Java Associate 7
Rafael Mulock
O.Objetos Java
Lorran Alves
Java
Junio Campos
JPA/Hibernate
Roberta Yaskarel
Aula 05 - Biblioteca MapReduce
Ronaldo Pimentel
Java - Orientação a Objetos
Leandro Serra
Encapsulamento
Marcos Fernandes2129
Java Básico
jr.desenvolvimento
Browse Library