How can I ensure the destruction of a String object in Java?

前端 未结 9 980
感情败类
感情败类 2020-11-30 04:36

An empoyee at my company needs to modify data from a SQL Server database through a program I made. The program used Windows authentication at first, and I asked the DBAs to

9条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-30 05:21

    Interesting question. Some googeling revealed this: http://securesoftware.blogspot.com/2009/01/java-security-why-not-to-use-string.html. According to the comment, it won't make a difference.

    What happens, if you dont store the String in a variable but pass it via new String(char[])?

提交回复
热议问题