Skip to main content
edited tags
Link
trincot
  • 357.1k
  • 38
  • 282
  • 338
edited title
Link
Giorgi Tsiklauri
  • 11.5k
  • 9
  • 59
  • 84

How many objects will createbe created in string pool :?

edited body
Source Link
Giorgi Tsiklauri
  • 11.5k
  • 9
  • 59
  • 84

How many objects will createbe created in below javathe following Java code  :

 String s = "abc"; s = ""; String s2 = new String("mno"); s2 = "pqr"; 
String s = "abc"; s = ""; String s2 = new String("mno"); s2 = "pqr"; 

How many objects will create in below java code  :

 String s = "abc"; s = ""; String s2 = new String("mno"); s2 = "pqr"; 

How many objects will be created in the following Java code:

String s = "abc"; s = ""; String s2 = new String("mno"); s2 = "pqr"; 
added 5 characters in body; edited tags
Source Link
Loading
Source Link
Loading