Can substring create new object?



Can substring create new object?..

Answer / Shreyansh Verma

Yes, the substring method in Java creates a new String object. It returns a new string that is a sub sequence of the original string.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Find the value of a specified element of the array arr[i] where 0 <= i <= n-1

1 Answers   Amazon,


how to execute main()

4 Answers   Symphony, TCS,


What are Font and FontMetrics classes?

1 Answers  


How to find the length and capacity of a string buffer ?

2 Answers  


What are event-delegation model and event-inheritance model? Which is best?

1 Answers  


What is double checked locking in singleton?

1 Answers  


Does chrome use java?

1 Answers  


Can we define constructor in inner class?

1 Answers  


What is a numeric digit?

1 Answers  


How do u provide security in java

3 Answers  


What is Java exception handling?

1 Answers  


How many bytes is double?

1 Answers  


Categories