Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
Give me name of the extension methods Kotlin provides to java.io.File
Home
Kotlin
Give me name of the extension methods Kotlin provides to java.io.File
0
votes
asked
Oct 5, 2021
in
Kotlin
by
rajeshsharma
Give me name of the extension methods Kotlin provides to java.io.File
kotlin-extention-method
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Oct 5, 2021
by
rajeshsharma
below are the
the extension methods Kotlin provides to java.io.File
bufferedReader(): Use for reading contents of a file into BufferedReader
readBytes() : Use for reading contents of file to ByteArray
readText(): Use of reading contents of file to a single String
forEachLine() : Use for reading a file line by line in Kotlin
readLines(): Use to reading lines in file to List
Related questions
0
votes
Q: Tell me the default behavior of Kotlin classes?
asked
Oct 5, 2021
in
Kotlin
by
rajeshsharma
kotlin-classes
0
votes
Q: Can you tell me what kinds of programming types does Kotlin support?
asked
Oct 5, 2021
in
Kotlin
by
rajeshsharma
kotlin-support
0
votes
Q: Give a syntax for declaring a variable as volatile in Kotlin?
asked
Oct 5, 2021
in
Kotlin
by
rajeshsharma
kotlin-variable
0
votes
Q: Can we migrate code from Java to Kotlin?
asked
Oct 5, 2021
in
Kotlin
by
rajeshsharma
kotlin-migrate-code
0
votes
Q: Why you should switch to Kotlin from Java?
asked
Oct 5, 2021
in
Kotlin
by
rajeshsharma
kotlin-vs-java
0
votes
Q: What are some of the features which are there in Kotlin but not In Java?
asked
Oct 5, 2021
in
Kotlin
by
rajeshsharma
kotlin-features
0
votes
Q: Is there any Ternary Conditional Operator in Kotlin like in Java?
asked
Oct 5, 2021
in
Kotlin
by
rajeshsharma
kotlin-ternary-condition
0
votes
Q: Why is Kotlin interoperable with Java?
asked
Oct 5, 2021
in
Kotlin
by
rajeshsharma
kotlin-interoperable
0
votes
Q: Name different methods for IO console in Ruby?
asked
Nov 15, 2021
in
Ruby
by
Robin
ruby-console
0
votes
Q: Choose all correct statements. S1: Swift was developed by Apple Inc S2: Swift has file name extension as .swift S3: Swift is an alternative to the Objective-C language
asked
Nov 6, 2022
in
Swift
by
rajeshsharma
swift
...