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
object ParameterizedType { | |
//class definitions | |
class Pet(val name: String) { | |
override def toString = name | |
} | |
class Dog(override val name: String) extends Pet(name) | |
//covariance example |
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
package dojo1_Roman; | |
public class RomanConverter | |
{ | |
public enum Digit | |
{ | |
UNIT, DECIMAL, HUNDRED, THOUSAND | |
}; |
NewerOlder