dimanche 9 septembre 2018

If-then-else statement use

Method: “run”

  • Create endless loop
  • If MerkleManager.sMerkleRoot is not null then...
  • If the above merkle root equals the initial user-entered merkle root.Then print out “You win: “ followed by the merkle root and exit the app.
  • Else if they’re not equal, then tell the user he lost – and exit the app.

My code:

public void run() {

    while (true) {
    }
    if MerkleManager.sMerkleRoot = null;
    {

    } else {

    } 
    System.exit(0);
}

How do I set MerkleManager.sMerkleRoot not null and use if-then-else statement?

Aucun commentaire:

Enregistrer un commentaire