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"...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
{{topTenTips}}
 
{{topTenTips}}
<shell>
+
<question height="100" width="150" className="Demo" rows="9" cols="40" lang='scala'>
 +
<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>
 
object Demo {
 
object Demo {
 
   def main(args: Array[String]) {
 
   def main(args: Array[String]) {
QcQ
+
    println("Hello world")
 
   }
 
   }
 
}
 
}
</shell>
 
<question height="100" width="150" className="Demo" title="France" 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
 
<prog>
 
println("Hello world")
 
print("Hello")
 
print("world")
 
printf("%s world","Hello")
 
 
</prog>
 
</prog>
 
</question>
 
</question>

Latest revision as of 19:57, 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]