Posts

Showing posts with the label Java I/O Streams

Java Input & Output Streams जावा इनपुट एवं आउटपुट स्ट्रीम

In every programming language, there is a mechanism to handle input and output.  In Java, input and output operations are mainly performed using streams, which are part of the java.io package. हर प्रोग्रामिंग लैंग्वेज में इनपुट और आउटपुट को संभालने की व्यवस्था होती है।  जावा में इनपुट और आउटपुट कार्य मुख्य रूप से स्ट्रीम्स का उपयोग करके किए जाते हैं, जो java.io पैकेज का हिस्सा हैं। Basic Console I/O Streams in Java  जावा में बेसिक कंसोल I/O स्ट्रीम्स Java provides three standard I/O streams for console input and output: जावा तीन मानक I/O स्ट्रीम्स प्रदान करता है कंसोल इनपुट और आउटपुट के लिए: 1️⃣ System.out – Standard Output Stream मानक आउटपुट स्ट्रीम This is used to print normal output to the console. इसका उपयोग कंसोल पर सामान्य आउटपुट प्रिंट करने के लिए किया जाता है। Example / उदाहरण: public class Sample { public static void main(String[] args) { System.out.println("Hello World"); } } Output / आउटपुट: Hello World 2️⃣ System.err – St...