Difference between revisions of "scala:Hello World"

From Progzoo
Jump to: navigation, search
(Created page with "{{topTenTips}} <shell> object Demo { def main(args: Array[String]) { QcQ } } </shell> <question height="100" width="150" className="Demo" title="France" rows="9" cols="40"...")
 
Line 7: Line 7:
 
}
 
}
 
</shell>
 
</shell>
<question height="100" width="150" className="Demo" title="France" rows="9" cols="40" lang='scala'>  
+
<question height="100" width="150" className="Demo" rows="9" cols="40" lang='scala'>  
<code>println</code>  can be used to output to standard output; also print and printf - these work like <code>System.out.print</code> etc. in Java
+
<code>println</code>  can be used to output to standard output this works like <code>System.out.print</code> etc. in Java
 +
 
 +
See also
 +
*<code>print</code>
 +
*<code>printf</code>
 +
*<code>println</code>
 
<prog>
 
<prog>
 
println("Hello world")
 
println("Hello world")
print("Hello")
 
print("world")
 
printf("%s world","Hello")
 
 
</prog>
 
</prog>
 
</question>
 
</question>

Revision as of 19:56, 16 February 2015

println can be used to output to standard output this works like System.out.print etc. in Java

See also

  • print
  • printf
  • println


[Font] [Default] [Show] [Resize] [History] [Profile]