1
Developer's Corner / Re: Plz help me in writing Java equivalent code for this problem!
« on: September 21, 2009, 07:24 AM »
import java.util.*;
import java.io.*;
public class login
{
public static void main(String ar[])
{
try
{
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
String s;Integer pass;
System.out.println("enter the Username");
s=input.readLine();
System.out.println("enter the password must be numeric");
pass=Integer.parseInt(input.readLine());
if(s.equals("sam") && pass.equals(123) )
{
System.out.println("you are logined sucess fully");
}
else
{
System.out.println("you have entered the wrong");
}
}
catch (Exception e) {
e.printStackTrace();
}
}
}
import java.io.*;
public class login
{
public static void main(String ar[])
{
try
{
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
String s;Integer pass;
System.out.println("enter the Username");
s=input.readLine();
System.out.println("enter the password must be numeric");
pass=Integer.parseInt(input.readLine());
if(s.equals("sam") && pass.equals(123) )
{
System.out.println("you are logined sucess fully");
}
else
{
System.out.println("you have entered the wrong");
}
}
catch (Exception e) {
e.printStackTrace();
}
}
}