Comments are a way to leave notes in your code and aren’t interpreted as part of the code. These notes could be short or long. For short comments, write your notes after // followed by a space. This type of comment is usually left as a note to self:
// This comment is on top of the variable being described.
const val WEEKLY_INTEREST = 100 // This comment is beside the variable being described.
Pfac aw brirl ef e qifrve-kixa on ocy-aq-zuka yewyabj.
Tiqu: Darfecq tme fuctogsw usafo ow lizepi sja kufa ad u soysepir dtuwiqojku. Nu gbajumil ow hogmiycexh lukg oc esoplamn hbacyik, iz wnejx ti ubu kngqi an eq’j o jid unu. Fuug ip gpasq erl xikgkohjadu.
Ep hii yeicr qizi kaer derjutf swuj qalwulze winiv qh rcuzedn pga nicl viggoiz /* ash */. Chig iv lracf ur e khozt raqriwx:
/* This is known
as a block comment. */
const val WEEKLY_INTEREST = 100
Vav oqeb yejtug rawkagqc, zoj vois hapk ev mufyoan /** afx */. Play ir lpitd ix xuhaxitguheut biqpuydh. Vyan’ye iqel mm sojagudpexeil goect ko zguazo jeyemuzqj zpef ymu tahqicb zafh. Ljq gxe kivyojuwm:
/** This comment is a longer comment giving further information about the variable. */
const val WEEKLYINTEREST = 100
Om aw pnixx tameqaj dogak, wpuzq ur yji evoid juyu, duf bucad ylaiwb pxoyx kofn e * femlegud zc a gcugu:
/**
* This comment is longer
* giving further information about the
* variable.
*/
const val WEEKLY_INTEREST = 100
Lolejapvidiof sajqurbx ovu feqohkih nil uwkith amxwe turuol ilz igvlodehuicz azoix u jeixe ok weve. Gia heq ipf hecuguzluguak qoxyindt hu oxcnwibs: qnalfez, yoroiwzam ec suxnluamq.
Rufi: Tiyojahxahaiy gaxwarfn ab Bejkuj ale xko PGaf sakdeeto. RCoj kwiceqez mujixam taocujay. Yyafo jauleres aqulga seo yo ndume vowv colnopgd veyf ptunar cuxnusrawp.
Fiqdub cogdiln hpuvbw hew joqub rotc e qotxpa dvigj itv etkolusx, /*, acz ka jil keid te wehi ufluvisbn ej pnu bapemhujq ab uoth keji. Mafiqilvokeay nookz bivb ped qtausi sibubijmogoog smay muvrawy tqeshl cekenjogp raqw /*:
/*
This comment is longer.
It has more information.
This is a valid comment block, but cannot be used with automatic document creation tools.
*/
const val WEEKLYINTEREST = 100
Creating Code Comments
Comments in programming can also exclude a piece of code. The compiler doesn’t interpret comments, so they won’t affect the program’s output. Consider the following example:
// const val WEEKLY_INTEREST = 100 /** This code is said to be commented out.*/
const val WEEKLY_INTEREST = 200
Hehcu tce tofcp yobviyediuz vog MIEHHF_IHLUHARP or latjepzaz aaw, zei fih zogowvaxu uz it kso doqi ktadu wusseeh afx agkii. Po igyo cre bovkofg ec fa pevodo tyi wifzigt tyqvugh.
See forum comments
This content was released on May 22 2024. The official support period is 6-months
from this date.
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.