comments ဆိုသည်မှာ ရေးသားထားသော code များအား နားလည်လွယ်သော မှတ်ချက်၊ ရှင်းလင်းချက်များရေးသာရာတွင် အသုံးပြုလေ့ရှိပြီး execute လုပ်ခြင်းမှ ကာကွယ်ထားသော line များကို ဆိုလိုသည်။
Single-line Comments
Single-line Comments ဆိုသည်မှာ ရေးသားလိုသော မှတ်ချက် သို့ ရှင်းပြချက်များရှေ့တွင် "//" ဟုသင်္ကေတ ထည့်သွင်းရေးသားရသည်။
// This is a comment
System.out.println("Hello World");System.out.println("Hello World"); // This is a comment
Multi-line Comments
Multi-line Comments ဆိုသည်မှာ တစ်ကြောင်းထက်ပိုသော မှတ်ချက် သို ရှင်းပြချက်များ အားရေးသားရာတွင် အသုံးပြုလေ့ ရှိပြီး ရေးသားလိုသော စာများအား "/*" အဖွင့်သင်္ကေတ နှင့် "*/" အပိတ်သင်္ကေတ အကြား ရေးရသည်။
/* The code below will print the words Hello World
to the screen, and it is amazing */
System.out.println("Hello World");
No comments:
Post a Comment