kumar abhay

Ranch Hand
+ Follow
since Oct 02, 2001
Merit badge: grant badges
For More
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 kumar abhay

hi there,
hope that u all r fine.here is the programme which has a output which i dont expect so please help me out.

class Threads extends Thread{
public void run(){
System.out.println(Thread.currentThread()+"is going to start");
try{sleep(1000);
}catch(InterruptedException e){
System.out.println("Exception in"+Thread.currentThread()+" was Caught");
}
}
}
class TestThreads{
public static void main(String []args){
Threads[] t1={ new Threads(),new Threads()};
for (int i=0;i<t1.length;i++){
t1[i].start();
//t2.start();
t1[i].interrupt();
System.out.println(t1[i]+" is interrupted:-"+t1[i].isInterrupted());
}
}
}
/*output:
Thread[Thread-0,5,main] is interrupted:-true
Thread[Thread-1,5,main] is interrupted:-true
Thread[Thread-0,5,main]is going to start
Thread[Thread-1,5,main]is going to start
Exception inThread[Thread-0,5,main] was Caught
Exception inThread[Thread-1,5,main] was Caught
question :-
my question is that why interrupted statement comes first,rather it should come later?
hope that you ppl would help me out.
thanks in advance
with regards
kumar abhay*/
here is the programme given below:

Question 1:
my question is that y child thread is running everytime 2 times than of main thread.could u please clearify it more.
i will be really thankfull to u.
kumar abhay
[ edited to add 'code' tags (for readability) - George ]
[ July 17, 2002: Message edited by: George Brown ]
hi there,
thanks for ur reply.u were being very kind.but i want to say that would u plz help me out in "AWT" rather than swing.this would help me alot.
thanks in advance
with regards
kumar abhay
21 years ago
hi there,
hope u r doin' fine.here r list of questions given below:
Question 1:
Vector is the class of collection n data structure being used by vector is "array".
my question is that if it's array then how it's extensible(bec usually array does not exceed its size n in vector its extensible).
Question 2:
can we use data structure in a interface if yes then how it can be.n if we use data structure in
a interface,wont it be constant.this is making confusions so plz help me out.
thanks in advance
with regards
kumar abhay
21 years ago
hi there,
i hope that u ppl r doing fine.i m having problem in menu shortcut class.i have made a menu like notepad n i want to make its shortcut like to make shortcut of File menu which should work out by pressing ALT-F.i hope that u ppl will help me out.thanks in advance.
kumar abhay
[ June 02, 2002: Message edited by: Dirk Schreckmann ]
21 years ago
it was nice that u replied but could u plz make that more clear so that i could take it more easy.i hope this wont bother u ppl.
thanks in advance
kumar abhay
21 years ago
hi there,
i hope u r doing fine.i have a confusion regarding system.exit(0).if i place there 1 or 2 or so on wat exactly happens inside it n how it manipulates this all.hope that u would solve my problem.
take care
kumar abhay
21 years ago
hi there,
hope u r doin' fine.i heard about a sample exam of SCJP2 conducted by SUN people (which is free) n the last date for giving erxam is in the may.afterwards it's finished.so could u please tell me the site for taking that exam.
thanks in advance
take care
with regards
kumar
hi there,
i m having a problem regarding garbage collection,which is :
1.what is the condition which let go garbage collection ?
2.when our object is about to be garbage collected,that time finilize method calls.why?
3.access modifier with finilize method is
protected.why?
4.can we call oursalves garbage collection.if we can then how ?
i hope that u would help me out by clearing all of these concepts which r making confusions to me.
thanks in advance
kumar abhay
21 years ago
hi there,
hope that u r doing fine.i m having a problem regarding difference between "ERROR" & "EXCEPTION".could u plz demonstrate it in detail.i will be really thankfull to u.
thanks in advance.
kumar abhay
21 years ago
Question v:-Why multiple inheritance is is possible by interface rather than inheritance(by extends keyword).what is the purpose of introducing interface.what is that which we can not do in inheritance but in interface
Question vi:-Interface can not be protected but only public .why?
22 years ago

Question iii:-Main method of class Myclass is a static block n a static object is being made in it.how?
Question iv:- -Main method of class Myclass is a static block tell me how non-static methods are called from it?
i hope that you would do that.so thanks in advance
take care
with regards
kumar
(edited by Cindy to format code)
[ March 18, 2002: Message edited by: Cindy Glass ]
22 years ago

Question i:-Interface can not have objects,how instance methods are created?
[ March 18, 2002: Message edited by: Cindy Glass ]
22 years ago
hi there,
i hope u ppl r doing fine.i wanna know about "lazy or delayed initilization" in java.plz let me know with a demonatration.
thanks in advence
takle care
kumar abhay
22 years ago
hi there,
hope u ppl r doing fine.i m having problem in methods in which 2 things r making trouble for me ,given below:
1.pass by value
2.pass by reference
i want u to defines these terms with examples.
i will be really greatful to u.
take care
with regards
kumar abhay
22 years ago