suresh kamsa

Ranch Hand
+ Follow
since Jul 30, 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 suresh kamsa

Hi all,
I have text file with 700,000 lines. I am dividing the file into 8 different files and loading into sybase table using jdbc. The file0 thread is taking around 10 hrs to transfer the data and remaing threads (file1 to file 8) are taking only 2 hrs to complete. why is this happening? Am I doing any thing wrong. Text file and sybase are on the same server.
Thanks.
21 years ago
Where can I find Velumurgan's notes?
thanks.
Hi all,
could anyone provide me fundamental info with examples on threads. I want to prepare for java 1.4 test. I checked below links, they were kind of looks bit confusing for me at this moment.
http://java.sun.com/docs/books/tutorial/essential/threads/index.html
http://www.artima.com/insidejvm/ed2/ch20ThreadSynchronization01.html
http://www.javaworld.com/javaworld/jw-05-2002/jw-0503-java101_p.html
Thanks


Why the output is
i = 0, i * i = 0
i = 1, i * i = 1
i = 2, i * i = 4
*
**
***
****
and so on. After control coming to line1 how the control flows? Why is it not completing loop1 first? doing simultaneously both?. This is becuase of Threads I know but someone explain me pl.
Thanks.
Sorry for not keeping the code in UBB. I don't know whether Timer and TimerTask is in the scope of 1.4 or not. I was going through tutorial and not able to understand what is going on.
import java.util.Timer;
import java.util.TimerTask;
public class Reminder {
Timer timer;
public Reminder(int seconds) {
timer = new Timer();
timer.schedule(new RemindTask(), seconds*1000);
}
class RemindTask extends TimerTask {
public void run() {
System.out.println("Time's up"); // l4
timer.cancel();
}
}
public static void main(String args[]) {
System.out.println("About to schedule task "); // l1
new Reminder(58); l2
System.out.println("Task scheduled"); l3
}
}
Any one explain me the execution flow of above example.
According to me l1,l2,l3,l4 should get executed. After priting l1 it should wait for some time to print l2 instead of its print l1,l3 waiting for some time then printing l4. AFter printing l1 control should go to Constructor and wait for some time(seconds). Why is not doing?
Thanks.
To get good understanding of Threads Can I start with Threads JLS? Then refer RHE book then work on some examples?
Please suggest me any one.
I wanted to implement collection interface and work with it.
I am working on the above link but I am not able to figure it out how to write code which will make use of some of those methods. Do anyone have any examples ?
Could anyone proivde me an example of how to implement Collection Interface and how to use some of those methods like containsAll,addAll etc.
Thanks
How do I go to anilbachi mock exam site? If you have please send me the link.
Thanks
Can you tell the me the poddar's url, if it is not paid mock exam.
Ok, thanks for correcting me. Is there any site or notes I can find information about them.
Is there any JLS on Collections/Hashcode methods?
I know one for Assertions.
http://java.sun.com/j2se/1.4/docs/guide/lang/assert.html which is not exactely JLS but good info.
Thanks

Could anyone tell me why l1 is compile error?
How do aviod that error to make the program error
free?