Skip to content

Commit 9384408

Browse files
Update README.md
Fixed parenthesis in Typecasting for Kotlin example
1 parent fd4932c commit 9384408

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,16 +168,16 @@ val unsignedRightShift = a ushr 2
168168
169169
```java
170170
if (object instanceof Car) {
171+
Car car = (Car) object;
171172
}
172-
Car car = (Car) object;
173173
```
174174

175175
> Kotlin
176176
177177
```kotlin
178178
if (object is Car) {
179-
}
180179
var car = object as Car
180+
}
181181

182182
// if object is null
183183
var car = object as? Car // var car = object as Car?

0 commit comments

Comments
 (0)