Skip to main content

X Wang: Create Java String Using Double Quotes or Constructor?

In Java, a string can be created by using two methods: String x = "abc"; or String y = new String("abc"). What is the difference between using double quotes and using constructor? This question can be answered by using two simple code examples...

Community: General