Files
kotlin-fork/j2k/testData/fileOrElement/comments/comments.kt
T
2015-03-31 16:10:23 +03:00

29 lines
827 B
Kotlin

// ERROR: Class 'A' must be declared abstract or implement abstract member public abstract fun run(): kotlin.Unit defined in java.lang.Runnable
package foo
// we use package 'foo'
// imports:
import java.util.ArrayList // we need ArrayList
// let's declare a class:
class A /* just a sample name*/ : Runnable /* let's implement Runnable */ {
fun foo/* again a sample name */(p: Int /* parameter p */, c: Char /* parameter c */) {
// let's print something:
println("1") // print 1
println("2") // print 2
println("3") // print 3
// end of printing
if (p > 0) {
// do this only when p > 0
// we print 4 and return
println("3")
return // do not continue
}
// some code to be added
}
} // end of class A