Object Expressions
Object expressions create objects of anonymous classes, that is, classes that aren't explicitly declared with the class declaration. Such classes are handy for one-time use. You can define them from scratch, inherit from existing classes, or implement interfaces. Instances of anonymous classes are also called anonymous objects because they are defined by an expression, not a name.
Object Declarations
Singleton can be useful in several cases, and Kotlin (after Scala) makes it easy to declare singletons.
This is called an object declaration, and it always has a name following the object keyword. Just like a variable declaration, an object declaration is not an expression, and cannot be used on the right-hand side of an assignment statement.
Object declaration's initialization is thread-safe and done at first access
Like yours:
restTimer = object:CountDownTimer(10000,1000){
override fun onTick(millisUntilFinished: Long) {
// some code
}
override fun onFinish() {
// some code
}.start()
source: https://kotlinlang.org/docs/object-declarations.html#object-declarations