If we have a fully loaded war file and we want to use some tag define inside that war file, then how can we reuse tld, tag, or classes define inside that war file to our new web application.
class Chicks {
synchronized void yack(long id) {
for(int x = 1; x < 3; x++) {
System.out.println(id + " ");
Thread.yield();
}
}
}
public class ChicksYack implements Runnable {
Chicks c;
public static void main(String args[]){
new ChicksYack().go();
}
void go() {
c = new Chicks();
new Thread(new ChicksYack()).start();
new Thread(new ChicksYack()).start();
}
public void run() {
c.yack(Thread.currentThread().getId());
}
}
please tell me anyone the output of above code, and explain why.