19 lines
435 B
Kotlin
19 lines
435 B
Kotlin
|
package drills.drill08.exercise2
|
||
|
|
||
|
import java.rmi.Remote
|
||
|
import java.rmi.RemoteException
|
||
|
import java.rmi.server.UnicastRemoteObject
|
||
|
|
||
|
interface Finder : Remote {
|
||
|
@Throws(RemoteException::class)
|
||
|
fun find(str: String): Boolean
|
||
|
}
|
||
|
|
||
|
class FakeFinder : UnicastRemoteObject(), Finder {
|
||
|
override fun find(str: String): Boolean {
|
||
|
println(str)
|
||
|
for (i in 0 until 100000000L);
|
||
|
return str.length % 2 == 0
|
||
|
}
|
||
|
}
|