కోడ్‌జిమ్ విశ్వవిద్యాలయం కోర్సులో భాగంగా మెంటర్‌తో ఉపన్యాస స్నిప్పెట్. పూర్తి కోర్సు కోసం సైన్ అప్ చేయండి.


"వావ్, మరో మానవ మహిళ! అయితే ఈసారి నల్లటి జుట్టుతో. ఎంత ఎక్సైటింగ్!"

"హాయ్, నా పేరు కిమ్."

"హాయ్, నా పేరు అమిగో!"

"నాకు తెలుసు. నేను నీ పేరుతో వచ్చాను. డియెగో అలా ఆలోచించి వుండడు."

"పాఠానికి తిరిగి వద్దాం. మీకు మెటీరియల్‌ని వివరించడానికి నేను సాధారణ పదాలను ఉపయోగిస్తాను."

"అలాగే."

"ప్రొఫెసర్ మరియు రిషి చెప్పినదానికి నేను కొన్ని పదాలను జోడించాలనుకుంటున్నాను."

"జావాలో, మీరు ఆదేశాలను వ్రాయవచ్చు, కానీ మీరు కోడ్‌లోనే ఆ ఆదేశాలకు వ్యాఖ్యలను కూడా జోడించవచ్చు. కంపైలర్ వ్యాఖ్యలను పూర్తిగా విస్మరిస్తుంది. ప్రోగ్రామ్ అమలు చేయబడినప్పుడు, అన్ని వ్యాఖ్యలు విస్మరించబడతాయి. "

"దయచేసి నాకు ఒక ఉదాహరణ ఇవ్వండి."

"అలాగే తప్పకుండా:"

public class Home
{
    public static void main(String[] args)
    {
        /*
        Now we'll display the phrase 'Amigo Is The Best' on the screen
        */
        System.out.print("Amigo ");
        System.out.print("Is ");
        System.out.print("The ");
        System.out.print("Best");
    }
}    

"మేము వ్యాఖ్యను జోడించాము 'ఇప్పుడు మేము పదబంధాన్ని ప్రదర్శిస్తాము...' వ్యాఖ్య యొక్క ప్రారంభం ఒక జత గుర్తుల ద్వారా సూచించబడుతుంది ( /*), మరియు ముగింపు - ద్వారా ( */). ప్రోగ్రామ్ కంపైల్ చేయబడినప్పుడు, కంపైలర్ వాటి మధ్య ఉన్న ప్రతిదాన్ని విస్మరిస్తుంది చిహ్నాలు /*మరియు */. _

"అంటే నేనేమైనా వ్రాయగలను?"

"అవును. సాధారణంగా, కోడ్‌లోని వ్యాఖ్యలు అర్థం చేసుకోవడం కష్టంగా ఉండే కోడ్‌లోని భాగాలకు సంబంధించినవి. కొన్ని వ్యాఖ్యలు డజన్ల కొద్దీ స్ట్రింగ్‌లను కలిగి ఉంటాయి, ఆ పద్ధతులు ఎలా పనిచేస్తాయో సూక్ష్మ నైపుణ్యాలను వివరించడానికి పద్ధతులకు ముందు తరచుగా వ్రాయబడతాయి."

"కోడ్‌కు వ్యాఖ్యను జోడించడానికి మరో మార్గం ఉంది. మీరు రెండు ఫార్వర్డ్ స్లాష్‌లను ఉపయోగించవచ్చు ( //)."

public class Home
{
    public static void main(String[] args)
    {
        System.out.print("Amigo ");
        System.out.print("Is The "); // This is also a comment
        System.out.print("Best");
    }
}

"ఇక్కడ, // తో ప్రారంభమయ్యే కోడ్ మరియు // తో లైన్ చివరి వరకు ఉండే కోడ్ వ్యాఖ్యగా పరిగణించబడుతుంది . మరో మాటలో చెప్పాలంటే, 'వ్యాఖ్యను పూర్తి చేయడానికి' రెండవ జత గుర్తులు ఉపయోగించబడవు."

"మార్గం ద్వారా, కొన్ని వ్యాఖ్యలు నిజంగా ఆసక్తికరంగా ఉన్నాయి."

// I'm not responsible of this code. They made me write it, against my will.
// Dear future me. Please forgive me.
// I can't even begin to express how sorry I am.
// If I see something like this once more, I'll have a complete mental breakdown at work.
// If this condition is ever satisfied,
// please inform me for a reward. Phone: xxx-xxx-xxx.
// Dear maintainer:
// Once you are done trying to 'optimize' this routine,
// and have realized what a terrible mistake that was,
// please increment the following counter as a warning
// to the next guy:
// total_hours_wasted_here = 42
// When I wrote this, only God and I understood what I was doing
// Now, God only knows
// Sometimes I believe compiler ignores all my comments.
// I dedicate all this code, all my work, to my wife, Darlene, who will 
// have to support me and our three children and the dog once it gets 
// released into the public.
// Drunk, fix later
// Magic. Do not touch

"అవును, కొన్ని వ్యాఖ్యలు చాలా ఫన్నీగా ఉన్నాయి."

"ఈరోజుకి అంతే."

"అది చిన్నదైన కానీ ఆసక్తికరమైన పాఠం. ధన్యవాదాలు, కిమ్."