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
set SCRIPT_DIR=%~dp0 | |
java -Dfile.encoding=UTF8 -Dsbt.boot.directory=.\sbtboot -Dsbt.ivy.home=.\ivyrepo -Xmx512M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256m -jar "sbt-launch.jar" |
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 ClassWithVarParameter(var description: String) | |
// Which is equivalent to the following in Java: | |
// | |
// public class ClassWithVarParameter() { | |
// | |
// private String description; | |
// | |
// public ClassWithVarParameter(String description) { | |
// this.description = description; |
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 ClassWithValParameter(val name: String) | |
// Which is equivalent to the following in Java: | |
// | |
// public class ClassWithValParameter() { | |
// | |
// private String description; | |
// | |
// public ClassWithVarParameter(String description) { | |
// this.description = description; |
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
val aClass = new ClassWithPrivateFields("name") | |
// NOTE: aClass.name is not accessible | |
// Which is equivalent to the following in Java: | |
// | |
// public class ClassWithValParameter() { | |
// | |
// private String description; | |
// | |
// public ClassWithVarParameter(String description) { |
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
val someNumbers = Range(0, 10) // gives me a scala.collection.immmutable.Range object which contains every Int from 0 to 9 |
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
val someNumbers = Range(2, 10, 3) // gives me a scala.collection.immmutable.Range object which contains the Ints 2, 5, and 8 |
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
someRubyNumbers = (1..5) // gives me a Ruby Range object which contains the Ints 1, 2, 3, 4 and 5 |
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
someRubyNumbers = (1…5) // gives me a Ruby Range object which contains the Ints 1, 2, 3, and 4 |
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
val someNumbers = Range(0, 10).inclusive // gives me a scala.collection.immmutable.Range object which contains every Int from 0 to 10 |
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
val tuple = ("apple", "dog") | |
val fruit = tuple._1 | |
val animal = tuple._2 | |
fruit should be("apple") | |
animal should be("dog") |
OlderNewer