Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Mock Exam Errata
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Devaka Cooray
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Jeanne Boyarsky
Tim Cooke
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Tim Moores
Mikalai Zaikin
Carey Brown
Bartenders:
Forum:
Mock Exam Errata
Garbage collection
mrudul joshi
Ranch Hand
Posts: 54
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
This is the code I came across while seeing earlier posts regarding garbage collection in javaranch forums.
class Riddle { public static void main(String[] args) { String first, second; String riddle; if (args.length < 2) return; a: first = new String(args[0]); b: second = new String(args[1]); c: riddle = "When is a " + first; d: first = null; e: riddle += " like a " + second + "?"; f: second = null; g: System.out.println(riddle); h: args[0] = null; i: args[1] = null; j: } }
Select the one right answer.
1)d:
2)e:
3)h:
4)i:
5)j:
I think the right answer is [1] that is, wfter the line d in executed.
Please clarify if I am wrong.
thanks
mrudul
Valentin Crettaz
Author & Gold Digger
Posts: 7617
6
I like...
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
We have the code, the options but what is the question?
My Linked In
What is that? Is that a mongol hoarde? Can we fend them off with this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Garbage collection
Garbage Collection
Garbage Collection
garbage collection
Mock Quesion on Garbage Collection
More...