Difference between revisions of "User:ChampionAsh5357/Test"

From Forge Community Wiki
m
m (Update test workspace to current template, looks fine for initial converison)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{User:ChampionAsh5357/Snippets|
+
{{Template:Tabs/Code_Snippets
|title=Test
+
|file_name=Test
|java=public static void main(String args[]) {
+
|java=public static void main(String[] args) {
 
     System.out.println("Hello World");
 
     System.out.println("Hello World");
 
}
 
}
|kotlin=fun main() {
+
|kotlin=fun main(args : Array<String>) {
 
     println("Hello world!")
 
     println("Hello world!")
 
}
 
}
Line 10: Line 10:
 
     println("Hello, world!")
 
     println("Hello, world!")
 
}
 
}
|}}
+
|
<tabs>
 
<tab name="Java">
 
<syntaxhighlight lang="java">
 
public static void main(String args[]) {
 
    System.out.println("Hello World");
 
}
 
</syntaxhighlight>
 
</tab>
 
<tab name="Kotlin">
 
<syntaxhighlight lang="kotlin">
 
fun main() {
 
    println("Hello world!")
 
}
 
</syntaxhighlight>
 
</tab>
 
</tabs>
 
 
 
<tabs>
 
{{User:ChampionAsh5357/Tab/Snippet/Java
 
|public static void main(String args[]) {
 
    System.out.println("Hello World");
 
}
 
|title=Test
 
}}
 
{{User:ChampionAsh5357/Tab/Snippet/Kotlin
 
|fun main() {
 
    println("Hello world!")
 
}
 
|title=Test
 
}}
 
{{User:ChampionAsh5357/Tab/Snippet/Scala
 
|def main(args: Array[String]): Unit = {
 
    println("Hello, world!")
 
}
 
|title=Test
 
 
}}
 
}}
</tabs>
 

Latest revision as of 20:57, 7 April 2021

Test.java
public static void main(String[] args) {
    System.out.println("Hello World");
}
Test.kt
fun main(args : Array<String>) {
    println("Hello world!")
}
Test.scala
def main(args: Array[String]): Unit = {
    println("Hello, world!")
}