Posts
Showing posts from November, 2023
Typecast difference in java and kotlin | Automatic casting in java
- Get link
 - X
 - Other Apps
 
Capitalize the sentence in kotlin | replaceFirstChar() instead of capitalize
- Get link
 - X
 - Other Apps
 
Remove duplicate words from the sentence using LinkedHashSet in kotlin
- Get link
 - X
 - Other Apps
 
replaceFirst() method in kotlin | #shorts #beginners #kotlin
- Get link
 - X
 - Other Apps
 
Replace the digit to character using RegEx | #shorts #beginners #kotlin
- Get link
 - X
 - Other Apps
 
Replace substring in sentence using ignorecase | kotlin replace | #short...
- Get link
 - X
 - Other Apps
 
Ascending and Descending order in Kotlin | Sort in Kotlin | #shorts #beg...
- Get link
 - X
 - Other Apps
 
Mutable vs Immutable list in kotlin | #shorts @androidmani #kotlin #begi...
- Get link
 - X
 - Other Apps
 
forEach vs forEachIndex vs WithIndex in Kotlin | #shorts #beginners #kotlin
- Get link
 - X
 - Other Apps
 
NULL check in kotlin using let function | Scope function in kotlin #shor...
- Get link
 - X
 - Other Apps
 
Type conversion in Kotlin vs Java
- Get link
 - X
 - Other Apps
 
Type conversion in Kotlin vs Java In Java, The data type is automatically converted to another data type but In Kotlin we need to explicitly convert the data type like toInt(), toLong(), toString() More Type cast methods in Kotlin toChar() - To convert a data tye to Char type toInt() - To convert a data type to Int type toLong() - To convert a data type to Long type toFloat() - To convert a data type to Float type toDouble() - To convert a data type to Double type toByte() - To convert a data type to Byte type toShort() - To convert a data type to Short type Example in Java Int is automatically converted to a Long data type as long is larger than int. public class Demo { //    Type casting Java     public static void main (String[] args)     {         int a = 10 ;         long b = a;         System. out .println(a);         System. out .println(b);     } } In Kotlin the conversion is not automatic, we need to explicitly do the type conversion. Example in Kotlin fun main (args: Array...
Capitalize the each words in sentence of kotlin (Capitalize method getting deprecated)
- Get link
 - X
 - Other Apps
 
Capitalize Sentence with replaceFirstChar method (Capitalize getting deprecated)
- Get link
 - X
 - Other Apps
 
Remove duplicate word from sentence using LinkedHashSet in Kotlin
- Get link
 - X
 - Other Apps
 
Fibonacci Sequence using Recursive in Kotlin | #shorts #kotlin
- Get link
 - X
 - Other Apps