Saturday, July 22, 2023

BufferedReader String Example2

 import java.io.BufferedReader;

import java.io.IOException;
import java.io.InputStreamReader;

public class BuffReadStr2 {
    public static void main(String[] args)throws IOException {
       InputStreamReader ob=new InputStreamReader(System.in);
       BufferedReader br=new BufferedReader(ob);
       System.out.println("Enter a string");
       String s = br.readLine();
       System.out.println(s);
    }
}

No comments:

Post a Comment

SD Card vs SSD: What’s Really Happening Inside Your Storage

  We use SD cards in phones and cameras, and SSDs in laptops and PCs, almost without thinking. They both feel similar—fast, silent, and com...