public class English
{
private class Upper implements Runnable
{
public void run()
{
upper();
}
}
private class Lower implements Runnable
{
public void run()
{
lower();
}
}
private void upper()
{
for (char c='a'; c<='z'; c++) {
System.out.print(c);
}
System.out.println();
}
private void lower()
{
for (char c='A'; c<='Z'; c++) {
if (c=='A') {
Thread.yield();
}
try {
Thread.sleep(1);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.print(c);
}
System.out.println();
}
public static void main(String[] args) throws InterruptedException
{
English test = new English();
Upper upper = test.new Upper();
Lower lower = test.new Lower();
Thread t1=new Thread(upper);
t1.start();
Thread t2=new Thread(lower);
t2.start();
}
}