rushikesh sawant

Ranch Hand
+ Follow
since Dec 22, 2009
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 rushikesh sawant

method with var-arg is selected only if there is no other valid overload. You should read method overloading section.
ujjawal, your method definition says that it can accept Number type or its super types only.

but the list you are passing to that method says that it can accept Number type or its any of its subtypes also. So as generic is compile time protection compiler cannot make sure that you will pass only Number type to that method, hence compiler error.
Wrappers are peers to each other. They cannot be converted from one type to other.
programming using OOP concepts makes life easier for software people. Its easy to debug, test, and most importantly it provides component reuse which is essential for faster development and to cope with changing requirements in software development.
hey sorry, problem resolved. my mistake
i mixed it with -d and and class got placed again one level lower in directory tree.
got confused because of many files there
Thanks for reply.
yea, i did include package statement...
The following question is from K&B's self test, chapter 10:

Given the default classpath:
/foo
And this directory structure:

And these two files:


it asks for the right comman to compile B.java.

right answer is:
Set the current directory to test then invoke
javac -classpath . xcom/B.java

when i tried this example, it is not working.
it is working with, -classpath xcom xcom/B.java.
Am i getting this wrong?
yea.
um, what about second one? why 0? i think 3.
hey ankit i think in last one, 1 object should be eligible for gc. is it right?
EDIT:
oh got it.
EDIT:
1) 10 objects eligible for gc, variable "obj" is block scoped.
2) 0 objects eligible for gc.
3) 0 objects.
4) 0 object eligible for gc, wrappers are immutable.

i think these are the answers.
thanks for reply.
so does it mean that elements in PriorityQueue are not stored in a sorted manner of any kind? and its just the order in which they get removed is determined by either the natural order or by a comparator.
it took 15 days...
i think it will be good if you start reading book and get your doubts cleared here. it will help you a lot than anything else.