Labels

Java Comments

 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");
မှတ်ချက် 

တစ်ကြောင်းတည်းရှိသော မှတ်စု အတို (stort comments) များအားရေးသားရာတွင် "//" single-line comments အား အသုံးပြုပြီး တစ်ကြောင်းထက်ပိုသော ရှည်လျှားသော မှတ်စု (long comments) များရေးသားရာတွင် "/*  */"  multi-line comments ကို အသုံးပြုရသည်။

No comments:

Post a Comment

FinTech

 "FinTech" is a term that combines "financial" and "technology" and refers to the use of technology to provide...