Package java.io

Examples of java.io.Console.readLine()


            }

            System.out.println("\n> 1) creare una nuova partita");
            if (matches.size()>0) System.out.println("> 2) eliminare una partita");
            System.out.println("> 0) esci.");
            risposta = Integer.parseInt(console.readLine(">>> "));

            switch (risposta) {
                case 1:
                    nomeMatch = console.readLine(">>> Inserire il nome della partita: ");
                    maxPlayers = Integer.parseInt(console.readLine(">>> Inserire il numero massimo di utenti (2-4): "));
View Full Code Here


            System.out.println("> 0) esci.");
            risposta = Integer.parseInt(console.readLine(">>> "));

            switch (risposta) {
                case 1:
                    nomeMatch = console.readLine(">>> Inserire il nome della partita: ");
                    maxPlayers = Integer.parseInt(console.readLine(">>> Inserire il numero massimo di utenti (2-4): "));
                    adminGS.createMatch(nomeMatch, maxPlayers);
                    break;

                case 2:
View Full Code Here

            risposta = Integer.parseInt(console.readLine(">>> "));

            switch (risposta) {
                case 1:
                    nomeMatch = console.readLine(">>> Inserire il nome della partita: ");
                    maxPlayers = Integer.parseInt(console.readLine(">>> Inserire il numero massimo di utenti (2-4): "));
                    adminGS.createMatch(nomeMatch, maxPlayers);
                    break;

                case 2:
                    int scelta = Integer.parseInt(console.readLine(">>> Inserire il numero della partita: "));
View Full Code Here

                    maxPlayers = Integer.parseInt(console.readLine(">>> Inserire il numero massimo di utenti (2-4): "));
                    adminGS.createMatch(nomeMatch, maxPlayers);
                    break;

                case 2:
                    int scelta = Integer.parseInt(console.readLine(">>> Inserire il numero della partita: "));
                    if ((scelta>=0) && (scelta<matches.size())){
                        nomeMatch = matches.get(scelta);
                        adminGS.deleteMatch(nomeMatch);
                    }
                    break;
View Full Code Here

            System.exit(1);
        }
        while (true) {
            Pattern pattern =
            Pattern.compile(console.readLine("%nEnter your regex: "));
            Matcher matcher =
            pattern.matcher(console.readLine("Enter input string to search: "));
            boolean found = false;
View Full Code Here

            Pattern pattern =
            Pattern.compile(console.readLine("%nEnter your regex: "));
            Matcher matcher =
            pattern.matcher(console.readLine("Enter input string to search: "));
            boolean found = false;
            while (matcher.find()) {
                console.format("I found the text" +
                    " \"%s\" starting at " +
View Full Code Here

            // prompt for it (if interactive)
            Console cons = System.console();
            if (cons != null && programOpts.isInteractive()) {
                cons.printf("%s", strings.get("AdminUserRequiredPrompt",
                        SystemPropertyConstants.DEFAULT_ADMIN_USER));
                String val = cons.readLine();
                if (ok(val)) {
                    programOpts.setUser(val);
                    if (adminPassword == null) {
                        adminPassword = getAdminPassword();
                    }
View Full Code Here

        catch(Exception e) {
        }

        if (must_auth) {
            if (cons != null) {
                username = cons.readLine("Management username: ");
                password = String.valueOf(cons.readPassword("Management password: "));
            }
        }
        SosInterpreter interpreter = new SosInterpreter();
        return interpreter.collect(username, password, host, port);
View Full Code Here

      while (!dataOK)
      {
        System.out.print("E-mail address: ");
        System.out.flush();
       
        email = console.readLine();
            if (!StringUtils.isBlank(email))
            {
                email = email.trim();
            }
            else
View Full Code Here

            }
       
        System.out.print("First name: ");
        System.out.flush();
       
        firstName = console.readLine();

            if (firstName != null)
            {
                firstName = firstName.trim();
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.