Created
          December 30, 2014 04:12 
        
      - 
      
- 
        Save ostretsov/fd1619cf8a640b133e98 to your computer and use it in GitHub Desktop. 
  
    
      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
    
  
  
    
  | class NewYear(y: Int) { | |
| val MinYear = 2014 | |
| require(y > MinYear) | |
| val year = y | |
| def this() = this(2015) | |
| override def toString = "Upcoming year is "+year | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment