-5

if already one foo is present in heap , will it create new foo again in heap?

Jim Garrison
  • 85,615
  • 20
  • 155
  • 190

1 Answers1

0

Yes a new Object will create in heap java Because you have create a new Object of String using new keyword

Birbal Singh
  • 1,062
  • 7
  • 16