Posts

Showing posts with the label BufferedReader input

Interactive Input and Output in Java जावा में इंटरैक्टिव इनपुट और आउटपुट

Interactive Input and Output in Java means taking input from the user at runtime and providing dynamic output based on the input. जावा में इंटरैक्टिव इनपुट और आउटपुट का अर्थ है रनटाइम पर उपयोगकर्ता से इनपुट लेना और उसके आधार पर आउटपुट देना। Key Points / मुख्य बिंदु:- Interactive Input : User enters data using console or GUI. इंटरैक्टिव इनपुट : उपयोगकर्ता कंसोल या GUI से डेटा देता है। Interactive Output : Program responds according to input. इंटरैक्टिव आउटपुट : प्रोग्राम इनपुट के अनुसार आउटपुट देता है। Common Classes : Scanner , BufferedReader , Console . सामान्य क्लासेस : Scanner , BufferedReader , Console । 💻 Example 1: Using Scanner for Interactive I/O import java.util.Scanner; public class InteractiveScanner { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("Enter your name: "); String name = sc.nextLine(); System.out.print("Enter your age: "); int a...