If these methods are called from two different threads at the same time, what will be the result?
public class FirstWord { public static synchronized void writeFirstWord(boolean fromSecondWord) throws Exception { if(fromSecondWord == false)
SecondWord.writeSecondWord();
System.out.print("Redflex"); }}
public class Second Word { public static synchronized void writeSecondWord() throwsException {
Thread.sleep(100);
FirstWord.writeFirstWord(true);
System.out.print(" Traffic Systems"); }}