publicclass MainClass{
public MainClass(){
StringBuffer sbuf = new StringBuffer();
sbuf = null;
System.gc();
//...
}
}
A. After 'sbuf = null', the sbuf is garbage collected.
B. After 'System.gc()', the sbuf is garbage collected.
C. After 'sbuf = null', the sbuf is eligible for garbage collection.
D. After 'System.gc()', the sbuf is eligible for garbage collection.