public class DemoString{
public static void main(String[] args){
String user = "Rizki";
String pass = "123";
if (pass.equals("123"))
System.out.println("Welcome "+user);
else if (!pass.equals("123"))
System.out.println("Access denied for "+user);
}
}
No comments:
Post a Comment