Sha256: 18716f132e5a9d23bba19e00cd3afdc375c792dff7d6d0328d6dafe013e4fb17
Contents?: true
Size: 758 Bytes
Versions: 10
Compression:
Stored size: 758 Bytes
Contents
{{libheader|Console}} ===Ad hoc REPL solution=== Ad hoc solution as [http://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop REPL] script. Type this in a REPL session: println("Hello world!") ===Via Java runtime=== This is a call to the Java run-time library. '''Not recommended'''. System.out.println("Hello world!") ===Via Scala Console API=== This is a call to the Scala run-time library. '''Recommended'''. println("Hello world!") ===Short term deviation to out=== Console.withErr(Console.out) { Console.err.println("This goes to default _out_") } ===Long term deviation to out=== Console.err.println ("Err not deviated") Console.setErr(Console.out) Console.err.println ("Err deviated") Console.setErr(Console.err) // Reset to normal
Version data entries
10 entries across 7 versions & 1 rubygems