package example; import java.util.Scanner; public class Example { public static void main(String[] args) { Scanner sc= new Scanner(System.in); System.out.print("Enter your name: "); String name=sc.nextLine(); System.out.print("Enter your Password: "); int pass=sc.nextInt();
package javaapplication6; import java.util.Scanner; public class JavaApplication6 { public static void main(String[] args) {
Scanner inp = new Scanner(System.in);
System.out.println("Enter your username"); String username = inp.next();
System.out.println("Enter your password"); String password = inp.next();
if ("arambatasy".equals(username)){ System.out.println("your usensme is right"); }else { System.out.println("your username is wrong"); } if ("aram".equals(password)){ System.out.println("your password is correct! "); }else { System.out.println("username and password are wrong"); }
dastakant xoshbet nmunat zoor bet
Dast xosh be
به س ئه وه فيديويانه بوچ به کاردیت
dast xosh
package example;
import java.util.Scanner;
public class Example {
public static void main(String[] args) {
Scanner sc= new Scanner(System.in);
System.out.print("Enter your name: ");
String name=sc.nextLine();
System.out.print("Enter your Password: ");
int pass=sc.nextInt();
if(!name.equals("hama")){
System.out.print("Your name isn't Correct");
}else if(pass != 1999){
System.out.print("Your Password isn't correct");
}else{
System.out.print("You Entered");}
}
}
package javaapplication7;
import java.util.Scanner;
public class JavaApplication7 {
public static void main(String[] args) {
Scanner fb=new Scanner(System.in);
System.out.println("enter your email:");
String x = fb.nextLine();
System.out.println("enter your password:");
String y = fb.nextLine();
if(x=="faraidunbahaden"){
System.out.println("wrong email" );
}
else if(y=="fara1234"){
System.out.println("wrong password" );
}
else{
System.out.println("wrong password
or email" );
}
package sign;
import java.util.Scanner;
public class Sign{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String user, key;
System.out.print("Username: ");
user = sc.nextLine();
if (!user.equals("Molly")) { System.out.println("Incorrect Username"); }
else {System.out.print("Password: "); key= sc.nextLine();
if(!key.equals("amen")) {System.out.println("Inccorect Password");}
else {System.out.println("loged in...");
}
}
}
package javaapplication6;
import java.util.Scanner;
public class JavaApplication6 {
public static void main(String[] args) {
Scanner inp = new Scanner(System.in);
System.out.println("Enter your username");
String username = inp.next();
System.out.println("Enter your password");
String password = inp.next();
if ("arambatasy".equals(username)){
System.out.println("your usensme is right");
}else {
System.out.println("your username is wrong");
}
if ("aram".equals(password)){
System.out.println("your password is correct! ");
}else {
System.out.println("username and password are wrong");
}
}
}
dast xosh