Click here to Skip to main content
16,018,650 members

Comments by Member 13798091 (Top 7 by date)

Member 13798091 3-Aug-24 9:28am View    
Deleted
fun main() {
UpperCaseWriter(FileWriter("log.txt")).use {
it.write(
"""
This is a test
another line
SOME UPPERCASE TEXT
""".trimIndent())
}
}
I think here, it.write(str) calls:

public void write(String str) throws IOException {
write(str, 0, str.length())}
//and this write(str, 0, str.length())
//calls my overriden fun write that is:
override fun write(str: String, off: Int, len: Int) {
super.write(str.uppercase(), off, len)
}
Member 13798091 31-Jul-24 7:01am View    
The problem is that when I delete uppercase() from this
super.write(str.uppercase(), off,
len)
It will not print the text uppercased?
And when I hit ctrl and click on write from this super.write(newbuf) it takes to me the write(str, off,
len) that is overriden bellow it?
Member 13798091 31-Jul-24 7:00am View    
The problem is that when I delete uppercase() from this
super.write(str.uppercase(), off,
len)
It will not print the text uppercased?
And when I hit ctrl and click on write from this super.write(newbuf) it takes to me the write(str, off,
len) that is overriden bellow it?
Member 13798091 31-Jul-24 6:59am View    
The problem is that when I delete uppercase() from this
super.write(str.uppercase(), off,
len)
It will not print the text uppercased?
And when I hit ctrl and click on write from this super.write(newbuf) it takes to me the write(str, off,
len) that is overriden bellow it?
Member 13798091 2-Jan-20 8:23am View    
I have trid
val intentNew = getIntent()

But the same
what should I do?
given that I a mfollowing a tutor