sneha sn

Greenhorn
+ Follow
since Sep 23, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sneha sn

Hi thanks to all of you for solving my doubts and queries.
i got 3 wrong...1 in threads and 1 in GC . One more in FLowControl and ASsertions dont know exactly which
Exam is real close to Marcus Green but GC and Threads are tougher
20 years ago
Hi thanks a lot everyone.I feel really encouraged to see your replies. It gave me a big boost of confidence. will tell tomorrow about my score.
I have been studying on and off for 6 months now....but for past 1 month i studied hard....before that it was just i used to study whenever i could find time
Thanks again evryone
Hello everyone
I have my exam coming up the day after tomorrow
I gave SCJP1.4 exam Marcus Green 4 ...I scored 98% in that
Could you please tell me how does this exam compare to the real one so that I can feel satisfied that my prep is good
Do reply ASAP
Please can someone tell me why this code gives the foll error?it seems we cant create an instnace of static nested class with new()
import java.io.*;
class Sample {
public static void main( String arg[] ) {
System.out.println("I'm a little sample, short and ... ");
Sample.LittleSample b = new Sample().new LittleSample();
}
static class LittleSample {
static String str = "stout";
LittleSample() {
System.out.println(str);
}
}
}
A.java:5: qualified new of static class
Sample.LittleSample b = new Sample().new LittleSample();
I read somewhere that >>> operator always results in a positive number.
Is it statement true or false. I think it is true but answer was given as false. Maybe the exam creator had in mind if a negative number is >>> by 0 then asnwer will be negative?
Isnt it that String objects are kept in a buffer and used for compile time optimizations. If so then object "java" will never be GCed.Please clarify regarding GC of Strings.
Can someone verify the answer of this code:
class Test {
static boolean status;

public static void Process(boolean status) {
if(!status) {
String s = "Java";
int i;
s = "JavaScript";
String x = "Java";
String y = x;
x=null;
i=1;
};
}

public static void main(String [] args) {
Test t = new Test();
Process(status);
}
}
How many objects are eligible for Garbage Collection?
1)Cannot determine.
2)1
3)2
4)3
5)compile-time error occurs.
6)No object is eligible for GC.
I feel it should be option 6 but the place from where i got this question says it should be option 2