什么是.NET等价的StringBuffer在Java中? [英] What is the .NET equivalent of StringBuffer in Java?

查看:404
本文介绍了什么是.NET等价的StringBuffer在Java中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是.NET相当于 的Java。 ?lang.StringBuffer

What is the .NET equivalent of java.lang.StringBuffer?

推荐答案

这是的 System.Text.StringBuilder 。请注意,在现代的Java你会使用 的java.lang .StringBuilder 了。 (这就像的StringBuffer ,但没有同步 - 我不记得我最后一次的希望的同步的StringBuffer 。注意,.NET 的StringBuilder 不是线程安全的两种,但同样,我不记得上一次我发现,是一个问题。)

It's System.Text.StringBuilder. Note that in modern Java you'd use java.lang.StringBuilder too. (It's like StringBuffer, but without the synchronization - I can't remember the last time I wanted the synchronization of StringBuffer. Note that the .NET StringBuilder isn't thread-safe either, but again, I can't remember the last time I found that to be a problem.)

这篇关于什么是.NET等价的StringBuffer在Java中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆