This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Five Lines of Code and have Christian Clausen on-line!
See this thread for details.
Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

sriram gupta

Ranch Hand
+ Follow
since Aug 09, 2001
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 sriram gupta

hi all,
i tried to compile followign code
class poi
{
public static void main(String[] args)
{StringBuffer sb1= new StringBuffer("HELLO");
char[] b={'a', 'b'};
System.out.println(sb1.setCharAt(3,b[1]));
}
}
in comopilation it is giving following error..

bpoi.java:6: Incompatible type for method. Can't convert void to char[].
can anybody tell me what is wrong...
18 years ago
hi all,
i tried to compile followign code
class poi
{
public static void main(String[] args)
{StringBuffer sb1= new StringBuffer("HELLO");
char[] b={'a', 'b'};
System.out.println(sb1.setCharAt(3,b[1]));
}
}
in comopilation it is giving following error..

bpoi.java:6: Incompatible type for method. Can't convert void to char[].
can anybody tell me what is wrong...
thanks gurpreet...
for ur kind advice...
i will try this..
but still the question remains is that how did it happen???
hi gurpreet,
i wished something like this would have never happened.. actually i bought the voucher from some other person... i registered for the exam on coming monday.. today i got the call from prometric center and they claimed that this voucher has been used earlier..
so i don't know what happened wrong.. it might possible that the person from whom i bought voucher, cheated me.. or something else..
but, i was thinking that they would take the voucher from us when we give the exam as a prove that we have given exam...
can somebody, who have given exam, can tell me what is the actual procedure?? mean do they take the voucher from u when u appear for the exam or they will return it back...

may be this mail can be useful for the person who is buying the voucher from somebody else instead of prometric center..
awaitign for ur reply.
thanks
bye
hi all,
i am in a trouble.... i lost my voucher.... and i have to give exam as soon as possible... so if anybody in bombay wants to sell his/her voucher mail me on
ajay7dl@yahoo.com

thanks
hi all,
i think the code given by me is making a lot of confusion..
my actual question was
/*hi all,
in velmurugan notes in interface section it is given that
"if an interface specifies an exception list for a method, then the class implementing the interface need not declear the method with the excpetion list for a method."

*/
so if anybody can tell em what does it means it will be very helpful...
thanks
hi,
sorry for the mistake in typing...
my actual program was

interface in{public void foo() throws Exception};
class out implements in{ public void foo(){ throw new Exception();}

but it was not workign... the error i was finding our was related
to not defined error in method foo....
hi,
sorry for the mistake in typing...
my actual program was

interface in{public void foo() throws Exception};
class out implements in{ public void foo(){ throw new Exception();}

but it was not workign... the error i was finding our was related
to not defined error in method foo....
thanks vanitha,
now it is clear....
but there is one more point which is not very clear to me... it is that
"instance initializers can throw any exception in annonymous class"
if u can tell me about this too it will be very useful...
i will like to add one point to this..
the all rules whihc apply when we override a method will apply in case of static too...
so be careful abuot that
and if i am wrong tell me so..
bye
hi all,
in velmurugan notes in interface section it is given that
"if an interface specifies an exception list for a method, then the class implementing the interface need not declear the method with the excpetion list for a method."
this is not clear for me... what i understood by this is following

interface in{public void foo() throws Exception};
class out{ public void foo(){ throw new Exception();}
should not complain as we have defined throws list in our interface..
well this program is not working...
am i missign soemthign
somebody plz help...
thanks in advance
bye
can u tell me where this was discussed...
hi all (once again )
in velmurugan notes it is given that static initializer cannot pass on the checked exceptions. they have to catch and handle them...
i am not sure what does it means.. can anybody tell me about this..
thanks in advance
bye
hi all,
in velmuruugan notes for protected it says that a subclass in another package can access the protected members in the super-class bia only the references of subclasss of subclass or its sublcasses.... can anybody explain what does this mean???
thanks in advance
no... if it is not unchecked exception... if a try block can throw a checked expception it should be able to catch it...
what i can say is that if u want to run finalize method of the super class then u have to explicitly call the fianlize method of super class... but compilier doesn't check.. so even if u haven't called finalize method of super class compiler will not complain....
hope it will help