Advertisement
Thiagofsr

Java Aplication

Aug 21st, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.82 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package atividade;
  7.  
  8.  
  9.  
  10.  
  11. /**
  12.  *
  13.  * @author Thiago Filipe
  14.  */
  15. public class Atividade {
  16.  
  17.     /**
  18.      * @param args the command line arguments
  19.      */
  20.     public static void main(String[] args) {
  21.        
  22.         Data dataTest = new Data();
  23.         dataTest.setDiaCarai(2);
  24.         dataTest.setMesCarai(12);
  25.         dataTest.setAnoCarai(2016);
  26.        
  27.         System.out.println(dataTest.toStringFormated());
  28.         if (dataTest.isValid()){
  29.             System.out.println("A data é válida");
  30.         }
  31.         else{
  32.             System.out.println("A data é inválida");
  33.         }
  34.        
  35.        
  36.        
  37.     }
  38.    
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement