Yes i would say both of them are correct

tentatively based on the context!
If at all the question has been asked that "how many objects are created in this method?" and all the aforementioned strings are part of a method, then th e answer is
none.
Why because, the string "test" is being a
literal,it is created when the class is being loaded. If it is having a "new", of course definitely there is a brand new string object created for you in heap!
Had they been an instance variables, there is
only one string object created during the class loading operation!
Hope this helps! :cheers:
[ April 08, 2008: Message edited by: Raghavan Muthu ]