Vipun Reddy

Greenhorn
+ Follow
since Mar 19, 2008
Merit badge: grant badges
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 Vipun Reddy

Hi abhi ,



This should return a string object.
the return statement is missing. check it out..!!
Hi Preetha,

Changing your code to something like this.. will not throw any warnings..




Reason :

You say that TreeSet takes in a Generic type of class A .
But when implementig comparator interface on class A you should also pass on the generic type on it.. check out the api doc for java.util.Comparator Interface for further reference..

So in the code above implemented abstract method takes the generic type as parameters and throws no compiler warnings.
[ December 01, 2008: Message edited by: Vipun Reddy ]
Hey ..

Congrats.. Ankit..!!!

Awesome..score.!!!
15 years ago
hey ..

its strange .. i asked a friend of mine to check it up .. and its showing 19.95$ for him and also the price in INR.

Varies with ISP ...!!

@ ankit garg : thanks a lot.
@ Aparna Misri : Try it out from some other place. may be net center or home.
Some indian ISP.
Am in Bangalore - India.

it says..

SCJP 6.0 Preparation Kit Details FREE Trial $49.95

WHIZLABS Link.

is this
It shows that its for $ 49.95.

Kindly check it out once again ...!!!
Hi Preetha,

hey its not matter of parameterless constructor or something else.

What you need is a method or characteristic on which you sort the things.

Suppose you have 100 persons. you cannot sort them with out knowing anything about their behaviour or something else, thats unique to that individual.

All that matters is how to sort and that can be done implementing java.util.Comparable interface and implementing the

public int toCompare(T o) method. Where T can be the class which you are implementing.

Hope you got the idea behind implementing Comparable interface ..!!
This might be an answer. One of the possibilities.




as integers do extend comparable interface.
The class can be sorted on the integer value.. passed during intialization.
Assigning it to the instance variable and using the instance variable to sort the Person class.
Hi Bart,

The message i want to convey is class cons2 ends up with the compilation error because its superclass doesnt have no arg constructor thats true.( Ofcourse explained )

But Ganesh 's Doubt is :

but my doubt is that i careted object for super class [new Cons1("gani")] using new keyword then how can constructor of sub class invoke?



The possiblity of facing the compile error is only when cons2 is compiled
Hi..

In the above code if you are trying to compile all the three files at the same time it definitely throws a compile error.

first compile cons1 and compile TestCons.. then it works fine for you.

when you try to compile cons2 throws a compile time error. because the call to the super() from default cons2 constructor throws the error as it is not available.

its not the problem with calling new cons1("ghani") ..

Hope the message i wanted to convey is clear.
hey..

Javaranch has a big collection.

Javaranch SCJP Mock Tests

Free SCJP practice Exams.

A few nice ones.. No point in letting your momentum down now just that you couldn't perform well in one mock exam..
Yesterday, you are the one advising Nabilla. And i saw you clearing lots of doubts and queries on the forum.You have strong funda.. Have no worries..
Be confident..!! Revise and give a shot with high spirits..!!

All the best
Hey,

If you want to buy it online.. Check this out..

SAPNA ONLINE BOOK STORE

473 Rs + 20 Rs (Postal)

I have ordered one and got it in 2 days.

Have Fun.. All the Best
hi Preetha Arun,

This may be of some help to you..
Concentrate on the change in scope of the object . Especially the call stack.

Run this piece of code .. you will understand how the object v is changing..





Call Stack .

In another method :
when vh is initialised .. another>amethod >main
v=vh
v is refered to variable on another stack..

In amethod method :
v is refered to variable on amethod stack.. amethod > main


I think thats how its works....
Hope its clear..
[ September 23, 2008: Message edited by: Vipun Reddy ]
hello ranchers...

Am planning to get a new study guide.. am preparing for scjp 1.5 ..
In dilemma whether to go for scjp 1.5 or scjp 1.6 study guides...

Is the new book revised and updated with new content of scjp 1.6(ie: navigale set .. etc..)only or the other topics of scjp 1.5 tooo..

I will be happy if some one can throw some light on the same..

thanks in advance..