Lesson 1 of 34

आपका पहला Java प्रोग्राम

7 min 20 XP

हर Java प्रोग्राम एक class के अंदर रहता है। प्रोग्राम main() method से चलना शुरू होता है। स्क्रीन पर टेक्स्ट हम System.out.println() से दिखाते हैं। नीचे दिए प्रोग्राम को Run करें।

Example: edit me and press Run

Output Loading Java (first time takes a few seconds)
Press Run to see the result here.

हर statement ; (semicolon) पर खत्म होना चाहिए। टेक्स्ट " " quotes के अंदर लिखा जाता है और उसे String कहते हैं। { } braces कोड को blocks में बाँधते हैं।

Example: edit me and press Run

Output Loading Java (first time takes a few seconds)
Press Run to see the result here.

println() print करने के बाद नई लाइन पर चला जाता है; print() उसी लाइन पर रहता है। Java case-sensitive है: System और String हमेशा capital S से शुरू होते हैं।

Challenge

+20 XP

ये दो लाइनें बिल्कुल इसी तरह print करें: Hello Java I can code!

Output Loading Java (first time takes a few seconds)
Press Run to see the result here.