tushar parab

Greenhorn
+ Follow
since Feb 11, 2009
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 tushar parab

Hi,
following is the code snippet from Cathy Siera SCJP book.

Given:

When // doStuff is reached, how many objects are eligible for GC?
A. 0
B. 1
C. 2
D. Compilation fails
E. It is not possible to know
F. An exception is thrown at runtime.

The answer for above code is C. Author says only two objects are eligible. Object c1 and Story object associated with it.
Can anyone please explain why answer is 2. Why only 2 objects are eligible for garbage collection and why Cardboard c3 is not eligible for garbage collection?
How to take user input values in java as we do it in c by using scanf and in C++ using cin >>
14 years ago
Can anyone suggest few good books for SCWCD exam and for Beginers in J2EE concepts(Servlets,JSP,EJB,RMI)
I have installed Tomcat on my pc(Windows XP) but when i try to compile the servlet code it gives me an error that package javax.servlet does not exists. the packagesI have imported are
java.io.*;
import javax.Servlet.*;
import javax.Servlet.http.*;
I have set 4 environment variables
CATALINA_HOME :C:\Program Files\Apache Software Foundation\Tomcat 6.0
CLASSPATH :C:\Program Files\Apache Software Foundation\Tomcat
JAVA_HOME :C:\Program Files\Java\Jdk1.6.0_18
PATH :C:\Program Files\Java\Jdk1.6.0_18\bin;
Location of the sourcecode file HelloWorldServlet is as follows
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\Examples\WEB-INF\classes
Can anyone suggest the solution. Thank you
What are the various web development tools in Java?
Can we call Apache, Web sphere or web logic as web development tools?