This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package aaa | |
import kotlin.reflect.KClass | |
import kotlin.reflect.full.createInstance | |
//open class Mammal(override val name: String) : Named | |
//class Cat(name: String) : Mammal(name) | |
// | |
//class List { | |
// fun get(n : Int) : Any? { return null} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package lambdas; | |
import kotlin.Unit; | |
import javax.swing.*; | |
import java.awt.*; | |
interface Foo<T> { | |
T doSomething(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package funcs | |
import java.awt.event.ActionEvent | |
import java.awt.event.ActionListener | |
class Person { | |
internal var name3 : String? = null | |
private var name2 : String? = null | |
var name : String? = null | |
var age : Int = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package streams | |
import kotlin.reflect.KClass | |
import kotlin.reflect.full.companionObject | |
import kotlin.system.measureNanoTime | |
val list1 = listOf(1,2,3,4,5,6,7,8,9,10) | |
val iteratorList = CustomList("iterator", list1) | |
val sequenceList = CustomList("sequence", list1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package misc | |
open class AA | |
class BB : AA() | |
class CC : AA() | |
interface A { | |
fun foo1() { println("A")} | |
fun foo2() : String { return "A"} | |
fun foo3() : AA { return BB()} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javadude.recyclerexample1 | |
import androidx.appcompat.app.AppCompatActivity | |
import android.os.Bundle | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import androidx.recyclerview.widget.ItemTouchHelper | |
import androidx.recyclerview.widget.LinearLayoutManager | |
import androidx.recyclerview.widget.RecyclerView |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main() { | |
println("Hello, World!") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main(args : Array<String>) { | |
println("Hello, World!") | |
println(args.joinToString()) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main() { | |
println("Hello, World!") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// JAVA CODE | |
public String getFirstName() { ... } | |
public void setFirstName(String firstName) { ... } |
OlderNewer