rajender


{ City } chennai
< Country > india
* Profession *
User No # 18236
Total Questions Posted # 1
Total Answers Posted # 7

Total Answers Posted for My Questions # 7
Total Views for My Questions # 15776

Users Marked my Answers as Correct # 60
Users Marked my Answers as Wrong # 15
Questions / { rajender }
Questions Answers Category Views Company eMail

can we create a object in static block class A { static { A a=new A(); } }

Cap Gemini,

7 Swing 15776




Answers / { rajender }

Question { EXL, 59354 }

Tell me abt ur self


Answer

hi iam rajender .iam dedicated ,determind and co-oparative
person.i completed b.tech in 2004 from jntu with 68%,now
iam working as java developer in patni computers.

Is This Answer Correct ?    2 Yes 2 No

Question { TCS, 22552 }

what is the difference between equals method and ==


Answer

The Object class equals method refers address comparision.

Person p=new Person();
Person p1=new Person();

if(p.equals(p1){
//is always false.

}


the string class equals method refers content comparision

String p=new String ("java");
String p1=new String ("java");

if(p.equals(p1){
//is always true.

}


Dn't get confusion

Is This Answer Correct ?    5 Yes 1 No


Question { TCS, 10386 }

If we close the browser,when the specific user session is
active.Again if we open browse how to retrive it same
user??what code i have to da???


Answer

hi ds is rajender .we hav uniq jsessionid cookie.if the
container remember our session so we set session time in
web.xml or in our application

web.xml:

200



Is This Answer Correct ?    2 Yes 6 No

Question { IBM, 16416 }

How can you say HashMap is syncronized?


Answer

i agree with 3,4,5,6,7 answers .hashmap is not syncronized

Is This Answer Correct ?    2 Yes 0 No

Question { CTS, 9389 }

if two references are having same hash codes,is that means
those are refering to same object?


Answer

i agree with anuradha answer.but we can implement hashcode
method.in case of strings they implemented hashcode

Is This Answer Correct ?    0 Yes 0 No

Question { TCS, 12399 }

Howmany number of objects we can store in an ArrayList. Is
there any limit?


Answer

there is no restriction to store object in arraylist.it's
default size is 10.wenever it's reaches the maximum size
it's increase size(current capacity*3/2+1).

Is This Answer Correct ?    7 Yes 1 No

Question { TCS, 22579 }

Can we declare static variables in JSP page.


Answer

yes

we should do in jsp declarative tag only.if we specify
variables in declaration tag, it belongs to class.
<%! static int i=0; %>

and u can not define static variable in scriptlet(<% %>).
as we know that we can not declare a static variable in a
method.

Is This Answer Correct ?    42 Yes 5 No