This file contains hidden or 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
// ... | |
println("End of surroundingFunction()") // This won't execute | |
// ... |
This file contains hidden or 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.chikekotlin.projectx.utils | |
fun checkUserStatus(): String { | |
return "online" | |
} |
This file contains hidden or 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.chikekotlin.projectx.utils | |
fun checkUserStatus(): String { | |
return "online" | |
} |
This file contains hidden or 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.chikekotlin.projectx.users | |
import com.chikekotlin.projectx.utils.checkUserStatus | |
if (checkUserStatus() == "online") { | |
// do something | |
} |
This file contains hidden or 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 */ | |
package com.chikekotlin.projectx.utils | |
public class UserUtilsKt { | |
public static String checkUserStatus() { | |
return "online"; | |
} | |
} |
This file contains hidden or 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 */ | |
import com.chikekotlin.projectx.utils.UserUtilsKt | |
... | |
UserUtilsKt.checkUserStatus() |
This file contains hidden or 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
@file:JvmName("UserUtils") | |
package com.chikekotlin.projectx.utils | |
fun checkUserStatus(): String { | |
return "online" | |
} |
This file contains hidden or 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 */ | |
import com.chikekotlin.projectx.utils.UserUtils | |
... | |
UserUtils.checkUserStatus() |
This file contains hidden or 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 */ | |
import com.chikekotlin.projectx.utils.UserUtils | |
... | |
UserUtils.checkUserStatus() |
This file contains hidden or 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
val message = { println("Hey, Kotlin is really cool!") } | |
message() // "Hey, Kotlin is really cool!" |