能解释一下 .toSting 和 .string 在Java中的区别吗?

huangapple go评论74阅读模式
英文:

Can anyone explain to me the difference between .toSting and .string in Java?

问题

我想知道.toString和.string之间的区别,我了解.toString这个术语,并且在过去的一年里一直在使用它,但我最近遇到了.string,想要了解一下它。提前谢谢。

英文:

I want to know the difference between .toString and .string , i know the term .toString and have been using it since last 1 year but i recently came upon .string and curious to know about it. Thanks in advance.

答案1

得分: 1

在Java的“标准库”中没有名为.string()的方法。

但是,在某些外部库和/或框架的API中可能会有.string()方法。其中一个例子是OkHttp API中的ResponseBody.string()方法。

英文:

There is no such method named .string() in Java's "standard library".

But, it could some external library and/or framework having .string() in their API. One of this example of such method is the .string() method in the ResponseBody of OkHttp API.

huangapple
  • 本文由 发表于 2020年9月30日 23:57:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/64141370.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定