Java Scanner Read readLine(String format, Object... args)

Here you can find the source of readLine(String format, Object... args)

Description

read Line

License

Open Source License

Declaration

private static String readLine(String format, Object... args) 

Method Source Code

//package com.java2s;
/*/*from  w w  w  .  jav a  2  s .  co  m*/
Copyright 2016 Seth Traverse
    
This file is part of SecureFiles.
    
SecureFiles is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
    
SecureFiles is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
    
You should have received a copy of the GNU General Public License
along with SecureFiles.  If not, see <http://www.gnu.org/licenses/>.
 */

import java.util.Scanner;

public class Main {
    private static String readLine(String format, Object... args) {
        System.out.print(String.format(format, args));
        return new Scanner(System.in).nextLine();
    }
}

Related

  1. readFileToList(File file)
  2. readFileWithoutComments(File input)
  3. readFromReader(Scanner scanner)
  4. readFromScanner(Scanner scanner)
  5. readInt(String prompt)
  6. readMatrix(Scanner in, int n)
  7. readPassword(String format, Object... args)
  8. readPositiveInt(String message, Scanner input)
  9. readSystemInToIntArrayList()