๊น€ํ˜œ์˜ ์†Œ๊ฐœ - 1

"์™€, ๋˜ ๋‹ค๋ฅธ ์ธ๊ฐ„ ์—ฌ์ž! ํ•˜์ง€๋งŒ ์ด๋ฒˆ์—๋Š” ๊ฒ€์€ ๋จธ๋ฆฌ๋‹ค. ์‹ ๊ธฐํ•ด๋ผ!"

"์•ˆ๋…•, ๋‚˜๋Š” ํ˜œ์˜์ด๋ผ๊ณ  ํ•ด."

"์•ˆ๋…•ํ•˜์„ธ์š”, ์ €๋Š” ์•„๋ฏธ๊ณ ์˜ˆ์š”!"

"์•Œ๊ณ  ์žˆ์–ด. ๋‚ด๊ฐ€ ๋„ค ์ด๋ฆ„์„ ์ƒ๊ฐํ•ด ๋ƒˆ์œผ๋‹ˆ๊นŒ. ๋””์—๊ณ ๊ฐ€ ํ˜ผ์ž์„œ ์ƒ๊ฐํ•˜์ง„ ์•Š์•˜์„ ํ…Œ๋‹ˆ."

์•„๋ฏธ๊ณ ์˜ ์ƒ๊ฐ์ด ์ „์ž์˜ ์†๋„๋กœ ์งˆ์ฃผํ–ˆ๋‹ค. "์Œ...์—ฌ์ž๊ฐ€ ์ •๋ง ์นœ์ ˆํ•˜๋„ค. ๋กœ๋ด‡์„ ์ข‹์•„ํ•˜๋Š” ๊ฑด๊ฐ€."

"๋ ˆ์Šจ์œผ๋กœ ๋Œ์•„๊ฐ€์ž. ๊ฐ„๋‹จํ•œ ๋‹จ์–ด๋กœ ์ž๋ฃŒ๋ฅผ ์„ค๋ช…ํ•ด ๋ณผ๊ฒŒ."

"์ข‹์•„์š”."

"๊ต์ˆ˜๋‹˜๊ณผ ๋ฆฌ์‹œ๊ฐ€ ํ•œ ๊ฐ•์˜ ๋‚ด์šฉ์— ๋ช‡ ๋งˆ๋”” ๋ง๋ถ™์ผ๊ฒŒ."

"์ž๋ฐ”์—์„œ ๋ช…๋ น์–ด๋ฅผ ๊ทธ๋ƒฅ ์“ธ ์ˆ˜๋„ ์žˆ์ง€๋งŒ, ํ•ด๋‹น ๋ช…๋ น์–ด์— ๋Œ€ํ•œ ์ฝ”๋ฉ˜ํŠธ๊นŒ์ง€ ์ฝ”๋“œ์—์„œ ๋ฐ”๋กœ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์–ด. ์ปดํŒŒ์ผ๋Ÿฌ๋Š” ์ฝ”๋ฉ˜ํŠธ๋ฅผ ์™„์ „ํžˆ ๋ฌด์‹œํ•˜์ง€. ํ”„๋กœ๊ทธ๋žจ์„ ์‹คํ–‰ํ•˜๋ฉด์„œ ์ฝ”๋ฉ˜ํŠธ๋Š” ๋ชจ๋‘ ์ƒ๋žตํ•ด ๋ฒ„๋ฆฌ์ง€."

"์˜ˆ๋ฅผ ๋“ค์–ด ์ฃผ์‹ค๋ž˜์š”?"

"๊ทธ๋Ÿด๊ฒŒ."

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

"๊ทธ๋ž˜, ์–ด๋–ค ์ฝ”๋ฉ˜ํŠธ๋Š” ์•„์ฃผ ์žฌ๋ฏธ์žˆ์–ด."

"์˜ค๋Š˜ ๋ ˆ์Šจ์€ ์ด๊ฑธ๋กœ ๋."

"์งง์•„๋„ ํฅ๋ฏธ๋กœ์šด ๋ ˆ์Šจ์ด์—ˆ์–ด์š”. ๊ณ ๋งˆ์›Œ, ํ˜œ์˜์•„."