sweety singh

+ Follow
since Dec 04, 2006
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sweety singh

Hi All
I have doubt what is the difference between redefining and overriding.
overriding is one way of redefining only?
I am referring to page 147 of Kathy sierra
static method can't be overridden but they can be redefined.
what specifically it means by saying redefining static method?
hi i tried it doing
it works the TLD file can have two uri elements

and in web.xml




note=both pointing to the same tld file
and in my jsp if i use
<%@ taglib prefix="my" uri="secondUri" %> it is working
if i give
<%@ taglib prefix="my" uri="useMyTag" %> this also is working
thanks for the reply ,could you please explain in more detail
hi i have confusion regarding the use of expression language,
if in servlet i write
String num="2";

in jsp if i write
${mynum>3}------it will return false
it means using mynum as a key i get a value-"2"
which is a string ,so how can we compare "2">3
or is it it returns a integer value 2,if so it is ok
but in servlet String num="2";
then how can it return int value
when first thread t1 is in execution it will call ser(servlet) doGet()or doPost()
and when thread t2 is executing it will again call ser doGet() or doPost()
there is nothing like methods are running in threads
when the web application is loaded, container creates instance of servlet,just one instance of servlet created, whenever a new request comes container creates a new thread and same objeat is passed to the new thread
eg Myservlet ser=new Myservlet();(suppose this is the object created by container )
Thread t1=new Thread(ser);-----for one client

Thread t2=new Thread(ser);-----for another client
passing same object means both thread will do the same job but for differnt clients as and when they get request from the client
if anybody know where to get HFSJ final mock exam
what is the difference between the request.getAttribute() and request.getParameter()? and when to use each of them
whenever there is expression evaluation using int or short or byte the result is always a int so
byte b=3;
byte c= 9;
byte a= b+c;
will not complile because afte adding b+c thje result is integer 12 and we are assigning it to byte so it requires explicit casting
so byte a=(byte)(b+c)
I just wanted to ask like when the object created all the instance variable and methods are on the heap within the object but what about the class variable where they are created?is it siomething like class also created on the heap with class name to store these class variable
i just wanted to know what is the signature of compare(),if i have overriden this method for comparision of pet class object
format should be
1)public int compare(Object o1,Object o2)

pet p1=(pet)o1;
pet p2=(pet)o2;
return (p1.name).compareTo(p2.name);
2)public int compare(pet p1,pet p2)
return (p1.name).compareTo(p2.name);

in kathy sierra 2)format given
but when i tried to run 1) was teh correct one
What to do about such questions
major topics to focus in SCJP1.5
14 years ago
where to find mock papers for scjp1.5
15 years ago