Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

fastreader in java

static class FastReader {

        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
Comment

PREVIOUS NEXT
Code Example
Java :: comment générer un nombre aléatoire en java 
Java :: System.out.printf("%"+(n)+"s ") 
Java :: how to unistall java 
Java :: jdk 15 download brew 
Java :: java actionperformed 
Java :: check if user has internet connection in kotlin 
Java :: enum values to string array 
Java :: reverse number java 
Java :: java how to fill an array 
Java :: create a hashmap 
Java :: selection sort java 
Java :: Divide two integers without using multiplication, division and mod operator 
Java :: java super keyword 
Java :: comparacion de strings java 
Java :: how to find sum of the digit of the numbers in java 
Java :: initialize hashmap java 
Java :: abstract code in java 
Java :: how to get index of arraylist in java 
Java :: spigot plugin send message 
Java :: pass array to method java 
Java :: java bfs 
Java :: java array get index 
Java :: java.lang.IllegalStateException: Could not obtain identifier 
Java :: How to summon an item in bukkit 
Java :: java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.Config 
Java :: how to call super onbackpressed in fragment 
Java :: how to convert character into operator 
Java :: find the unique element in a list java 
Java :: algorithm to know if a number is an integer 
Java :: java stream map int to char 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =