import java.io.*;
import java.util.*;
import java.lang.*;
class Login extends Thread
{
public void run()
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
Scanner s=new Scanner(System.in);
while(true)
{
System.out.println("Enter username:");
String h=br.readLine();
System.out.println("Enter password:");
String d=s.nextLine();
}
}
}
class Display extends Thread
{
public void run()
{
while(true)
{
System.out.println("ur username is:"+" "+h);
System.out.println("ur password is:"+" "+d);
}
}
}
public class Poco
{
public String h;
public double d;
public static void main(String args[])throws IOException
{
Login l=new Login();
Display a=new Display();
Thread t1=new Thread(l);
Thread t2=new Thread(a);
}
}
even if i declare the variables as public,it still shows can not find symbol
and i get an unreported exception and it says that it should be thrown
help.........