Gopinath Rajgopal

Ranch Hand
+ Follow
since Jun 26, 2000
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 Gopinath Rajgopal

Hi,
Can't I instal J2EE on Windows '95 and run a server like Apache?
What do I do??
Thanx.

Hi !!
I'm getting this exception when I start the server:
Hello Server failed: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve)
What could be worng ??
Somebody please help !!
23 years ago
Hi!!
I'm planning to take the SCJP on September 6th. I hear people saying Sun is going to include RMI, Networking, Swing etc from next month.
Is this true???
Please reply!!

Oh....thanx Ajith
23 years ago
Why should this be moved?
23 years ago
Hi,
In chapter 9 of the book, I found these two questions the answers to which, I think are not right. Could someone please clarify.
5. Which of the following methods cause the string object referenced by s to be changed:
A. s.concat()
B. s.toUpperCase()
C. s.replace()
D. s.valueOf()
Answer: A & B
But aren't string objects immutable? I think none of them is correct.

6. What is the output of the following program?
public class Question
{
public static void main(String args[])
{
String s1 = "abc";
String s2 = "def";
String s3 = s1.concat(s2.toUpperCase());
System.out.println(s1+s2+s3);
}
}

A. abcdefabcdef
B. abcabcDEFDEF
C. abcdefabcDEF
D.None of the above
Answer : D
But i think C is correct.

One more question.....are string literals eg: s = "One" garbage collected? If so, when?

Thanx.....
23 years ago
"String s="sssss";
it is created in the heap (not in the string pool), and not subject to garbage collection."

I think it is the opposite...it is created in the string pool and not in the heap........
Btw, what exam is this MindQ? Is it available thru the mock exams page on JavaRanch??
Q36. -> The answer b)1 is correct.

"........coz when string newName is reinitilized to "jason", the previous string "Nick" is eligible for GC and when name=null; the string "Frieda" is also eligible for GC......."
No, "Frieda" is not eligible for GC cos newestName is referring to it and so it is still reachable !!

Q 37. -> a) is correct cos you are only invoking (requesting) GC to run. The option doesn't say that it will run GC.
The complete reference by Patrick Naughton says it is - ie. every class is a sub class of itself. Only a "strict" sub class of a class cannot include itself.
Vivek,
I agree with you.....
1. List is an interface and not a class.
2. Yes, the boolean expression short circuits if s is null
3. toString() is a method in Object class.
Hi,
In the exam, if there are fill in questions that ask for literals, should I enclose them in quotes as in 'quote'??
Please someone reply...thanx..
Sandra...thanx...i got it !
Hi,
Some of you mention Exam 3 on the Marcus Green site...but i can find only 2...can anyone gimme the URL to the 3rd...
thanx
Nirmala, thanx...that sure helped..