Skip to content

Instantly share code, notes, and snippets.


Javi Mollà javimolla

View GitHub Profile
javimolla / test.scala
Created Feb 13, 2015
Read quotes and print one randomly
View test.scala
import scala.collection.mutable.ArrayBuffer
import util.Random.nextInt
object test extends App {
val source ="/path/to/quotes.txt")
val quotes = new ArrayBuffer[String]()
var current = ""
for (line <- source.getLines) {
if (line != "") {
You can’t perform that action at this time.