作者热门文章
- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
<分区>
我正在尝试调用一个函数,一个参数是当前时间和日期,另一个是文件名,它们都是字符串。如何将 Date()
转换为字符串。我试过:
writeToFile(content: Date(), fileName: "jm.txt")
但它给了我错误:
Cannot convert value of type 'Date' to expected argument type 'String'
我是一名优秀的程序员,十分优秀!