Share

paopaopaopaopao

Public

08 March 2021

Views: 39

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package pin;
import java.util.Scanner;
/**
*
* @author Paolo Anuada
*/
public class Pin {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Scanner input = new Scanner(System.in);

System.out.println("Enter 4 Digits Pin Code");
String code = input.nextLine ();
String pin = "2021";

if(code.equals(pin)){
System.out.println("Success");
}
else{
System.out.println("Invalid");
}
}
}

Advertisement

Disable Third Party Ads