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.Scanner; | |
| class Scratch { | |
| public static void main(String[] args) { | |
| Scanner sc = new Scanner(System.in); | |
| double a, b, c; | |
| a = sc.nextDouble(); | |
| b = sc.nextDouble(); | |
| c = sc.nextDouble(); | 
  
    
      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
    
  
  
    
  | void main() { | |
| Cachorro cachorro1 = Cachorro(); | |
| cachorro1.nome = 'Rex'; | |
| cachorro1.idade = 3; | |
| cachorro1.comer(); | |
| cachorro1.dormir(); | |
| cachorro1.latir(); | |
| Gato gato1 = Gato(); | |
| gato1.nome = 'Bolinha de neve'; | 
  
    
      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
    
  
  
    
  | void main() { | |
| Cachorro cachorro1 = Cachorro(); | |
| cachorro1.nome = 'Rex'; | |
| cachorro1.idade = 3; | |
| cachorro1.comer(); | |
| cachorro1.dormir(); | |
| cachorro1.latir(); | |
| Gato gato1 = Gato(); | |
| gato1.nome = 'Bolinha de neve'; | 
  
    
      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
    
  
  
    
  | void main() { | |
| Pessoa pessoa1 = Pessoa(nome: 'Silvio', idade: 40); | |
| print(pessoa1.nome); | |
| print(pessoa1.idade); | |
| Pessoa? pessoa2 = Pessoa(nome: 'Franco', idade:35) ; // se pessoa2 não for inicializada | |
| print(pessoa2?.nome.toUpperCase()); // pessoa2? vai printar nulo, caso a pessoa2 seja inicializada vai imprimir o valor... | |
| print(pessoa2?.idade); | |
| print(pessoa2?.cidade?.toUpperCase()); | 
  
    
      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
    
  
  
    
  | void main() { | |
| Pessoa pessoa1 = Pessoa(nome: 'Silvio', idade: 40); | |
| pessoa1.cpf = '123.456.789-00'; | |
| print('${pessoa1.nome} , ${pessoa1.idade}, ${pessoa1.cpf}'); | |
| print(pessoa1.temperatura); | |
| print(pessoa1.temperatura); // por mais que chamei a impressão varias vezes ele só chama o método para atribuir | |
| print(pessoa1.temperatura); // valor na variável na primeira vez que é chamado o print, se não chamar o print | 
  
    
      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
    
  
  
    
  | void main() { | |
| Pessoa.alturaPadrao = 1.80; | |
| Pessoa pessoa1 = Pessoa(nome: 'Silvio', idade: 45); | |
| pessoa1.nome; | |
| pessoa1.idade; | |
| pessoa1.comer(); | |
| Pessoa.atributoStatic = 'Olá'; | |
| print('${Pessoa.atributoStatic}'); | 
  
    
      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
    
  
  
    
  | void main() { | |
| Pessoa pessoa1 = Pessoa(nome: 'Silvio', idade: 45, casado: true); | |
| Pessoa pessoa2 = Pessoa(nome:'João' ,idade: 15); | |
| Pessoa pessoa3 = Pessoa(nome: 'Karina',idade: 21); | |
  
    
      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
    
  
  
    
  | void main() { | |
| Pessoa pessoa1 = Pessoa.solteira(nome: 'Silvio', idade: 45); | |
| print('${pessoa1.nome} ${pessoa1.idade} ${pessoa1.casado}'); | |
| print(pessoa1.aniversario()); | |
| pessoa1.casar(); | |
| print(pessoa1.casado); | |
  
    
      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
    
  
  
    
  | void main() { | |
| DateTime agora = DateTime.now(); | |
| Pessoa pessoa1 = Pessoa(); | |
| pessoa1.nome = "Silvio"; | |
| pessoa1.idade = 28; | |
| print('${pessoa1.nome} ${pessoa1.idade}'); //$ antes da variavel quando estiver dentro da '' | |
| pessoa1.aniversario(); | |
  
    
      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
    
  
  
    
  | void main() { | |
| DateTime agora = DateTime.now(); | |
| Pessoa pessoa1 = Pessoa(); | |
| pessoa1.nome = "Silvio"; | |
| pessoa1.idade = 28; | |
| print('${pessoa1.nome} ${pessoa1.idade}'); //$ antes da variavel quando estiver dentro da '' | |
| print(pessoa1.casado); | |
NewerOlder