This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface ComparacaoDeDesenhos { | |
boolean valePara(Desenho desenho); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
class ProgramaComForEach { | |
public static void main(String[] args){ | |
List<String> personagens = Arrays.asList("Pato Donald", "Mickey", "Pateta", "Pluto"); | |
for(int i = 0; i < personagens.size(); i++){ | |
String personagem = personagens.get(i); | |
System.out.println(personagem); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.time.LocalDate; | |
import java.time.temporal.TemporalAdjusters; | |
public class DatasImportantesNaoTestavel { | |
public LocalDate diaDoProgramadorDesseAno(){ | |
//como fazer para testar uma data do passado, por exemplo, de 2012? | |
return LocalDate.now().with(TemporalAdjusters.firstDayOfYear()).plusDays(255); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Aquatico { | |
default void move(){ | |
System.out.println("Move na água..."); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.time.DayOfWeek; | |
import java.time.LocalDate; | |
import java.time.Month; | |
import java.time.YearMonth; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.function.Function; | |
import java.util.function.Predicate; | |
import java.util.stream.Collectors; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Interface { | |
static void i(){ | |
System.out.println("interface"); | |
} | |
} | |
class ClasseMae { | |
static void a(){ | |
System.out.println("mãe"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.time.DayOfWeek; | |
import java.time.Month; | |
import java.time.YearMonth; | |
import java.util.function.Function; | |
import java.util.stream.Collectors; | |
import java.util.stream.Stream; | |
public class DiasUteisComCollectToMap { | |
public static void comCollectToMap(int ano) { | |
Stream.of(Month.values()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package baskara; | |
import java.util.Scanner; | |
import baskara.ResolvedorBaskara.ResultadoBaskara; | |
public class Programa { | |
public static void main(String[] args) { | |
try(Scanner sc = new Scanner(System.in)){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cargaHorariaDosServidores; | |
import java.io.IOException; | |
import java.nio.charset.Charset; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.util.LinkedHashMap; | |
import java.util.function.Function; | |
import java.util.regex.Matcher; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.com.caelum.argentum.bean; | |
//outros imports continuam... | |
import br.com.caelum.argentum.grafico.GeradorModeloGraficoCandle; | |
import org.primefaces.model.chart.OhlcChartModel; | |
@ManagedBean | |
@ViewScoped | |
public class ArgentumBean implements Serializable { |