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
if (pickupSelected && dropSelected) return gotoNextPage() | |
var msg: String? = "Please select pickup location" | |
if (selectedTab === "PICKUP_POINT" && pickupSelected) { | |
goToDrop() | |
msg = null | |
} | |
msg = msg ?: "Please select drop location" | |
if (selectedTab === "DROP_POINT" && dropSelected) { |
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() { | |
val carDealer = CarDealer() | |
println(carDealer.getSpeed(VehicleTypes.BUS)) | |
} | |
class CarDealer { | |
val map = HashMap<VehicleTypes, Vehicle>() | |
init { | |
map.put(VehicleTypes.CAR, Car()) |
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
class Student( | |
val name: String?, | |
val standard: Int, | |
val rollNumber: Int | |
) { | |
private constructor(builder: Builder) : this(builder.name, builder.standard, builder.rollNumber) | |
companion object { | |
inline fun student(block: Student.Builder.() -> Unit) = Student.Builder().apply(block).build() |
OlderNewer