{
This file contains hidden or 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.HashMap; | |
| import java.util.Map; | |
| class Cart { | |
| Map<Product, Integer> productsInCart = new HashMap<>(); | |
| public void addProductsInCart(Product product, Integer quantity) { | |
| productsInCart.put(product, quantity); | |
| } |
This file contains hidden or 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.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| public class Question1 { | |
| public static void main(String[] args) throws IOException { | |
| BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); | |
| String age; | |
| System.out.println("**********\tSistema Verificador da Idade do Eleitor\t**********"); |
This file contains hidden or 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
| public enum ExpendMonths { | |
| JANUARY_EXPENSE (Math.random() * 10000, "January"), | |
| FEBRUARY_EXPENSE (Math.random() * 10000, "February"), | |
| MARCH_EXPENSE (Math.random() * 10000, "March"), | |
| APRIL_EXPENSE (Math.random() * 10000, "April"), | |
| MAY_EXPENSE (Math.random() * 10000, "May"), | |
| JUNE_EXPENSE (Math.random() * 10000, "June"), | |
| JULY_EXPENSE (Math.random() * 10000, "July"), | |
| AUGUST_EXPENSE (Math.random() * 10000, "August"), | |
| SEPTEMBER_EXPENSE (Math.random() * 10000, "September"), |
This file contains hidden or 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
| $ git clone git@github.com:xxxxx/xxxx.git my-awesome-proj | |
| Cloning into 'my-awesome-proj'... | |
| ssh: connect to host github.com port 22: Connection timed out | |
| fatal: Could not read from remote repository. | |
| $ # This should also timeout | |
| $ ssh -T git@github.com | |
| ssh: connect to host github.com port 22: Connection timed out | |
| $ # but this might work |
Vamos configurar nosso ambiente de desenvolvimento, instalando ferramentas básicas para iniciarmos no mundo da programação.
Chocolatey é um gerenciador de programas e nos ajudará a instalar os programas de maneira programática, pelo terminal do Windows.
- Abra o PowerShell como administrador ( clique com o botão direto do mouse no ícone do PowerShell e procure a opção Abrir como Administrador )
- Coloque o código abaixo e dê ENTER