JAVA Fast IO with fast printing statement template

import java.io.;
import java.util.
;
class templa{
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; 
    } 
} 

public static void main(String...args) throws Exception {
    OutputStream outputStream =System.out;
    PrintWriter out =new PrintWriter(outputStream);
    FastReader in =new FastReader();
    int testcase = in.nextInt();
    while(testcase-- >0){
        //in object works same as Scanner Object but much faster
        //out.println() works faster than System.out.println()
        //Write your code here
    }
    out.close();
  }

}