Dan Polak

Ranch Hand
+ Follow
since Nov 06, 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 Dan Polak

Mirko thanks for reply...

I know all of that... but it is strange for me

If I can't write anything to the client after forwarding I should get an exception in my opinion

In my opinion only you need is to synchronize these two methods. Thats all.
hi everyone

I have two servlets and two doGet methods



I didn't get any exception but i think i should...
Can any one explain this?

consider that

String s = ",aa,aaa,aa,,,,";

String s = ",aa,aaa,aa,,,,";

String s = ",aa,aaa,aa,,,,";
Check yourself , do not use JVM!!!

*List<Integer> v = new ArrayList();
*List<String> v1 = new ArrayList();
*out.print(v == v1); //line 3

a) prints falsefalse
b) compile time error
c) prints truetrue
d) if 'line 3' will be removed prints true
e) prints falsetrue
f) if 'line 3' will be removed prints false
Long IS A Object, but Long IS NOT A String

Originally posted by Jothi Shankar Kumar Sankararaj:
Guys, I guess we are talking on two different questions, one with the f array and the other with the s array. With the originally posted question by Pandoo, the answer is 4.

NO The answer is 3

there are created only 6 objects s, s[0],s[1],s[2],s[3], s1(empty!!!)

s1[0] -> s[0];
s1[1] -> s[1];

so egiligible object are:
s, s[2],s[3]
5 is not true Krzystof because we can create and start thread in that method
Maybe someone know where is definition of static method values() whitch is available for every enums instance ?

enum A {


A[] a = A.values();
Of course it is not possible

What will happen when I run your methot like this

List<Integer> i = backwords(new ArrayList<Object>());

The answers doesn't fit to question!!!
Read one more time your question

Originally posted by xitiz bhatia:
K&B have mentioned the method declaration as erronous in their errata at the link below--

Now the method declaration becomes-
public static <E extends Number> List<E> process(List<E> nums)

now answer is B,E,F

i missed it in errata
For example

if you write your own class NewClass extends CharSequence ...
it couldn't fit to String


<? extends CharSequence> doesn't fit to <String>