Jump to content

whats wroung with this Java


Guest MindLess

Recommended Posts

Guest MindLess

import java.io.BufferedReader;

import java.io.IOException;

import java.io.InputStreamReader;

public class password {

public static void main(String args[])throws IOException {

boolean pw;

InputStreamReader isr= new InputStreamReader(System.in);

BufferedReader stdin= new BufferedReader(isr);

String password=stdin.readLine();

if(password.equals("yoyo")){

pw= true;

}

else {

pw= false;

}

test:

while (pw){

System.out.println("you said the wrong password : ");

continue test;

}

}

}

Link to comment
Share on other sites


  • Replies 1
  • Views 1.3k
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...