Java :: Точно не боян

    Date: 09/28/05 (Code WTF)    Keywords: no keywords

    Совершенно реальный кусок кода нашей системы, нарисованный индусами и для большей понятности немного причесанный и отформатированный.
    Hint: к константам присмотритесь, да?


    class
    PopulateTimesheetHelper { 400 private final String[] MONTH = {"JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOMBER", "NOVEMBER", "DECEMBER"}; 403 private int getMonth(String mnth) { 404 int count = 0, num = 0; 405 while (count < MONTH.length) { 406 if (MONTH[count].equals(mnth)) { 407 num = count; 408 } 409 count++; 410 } 411 return num; 412 } 413 }

    Source: http://www.livejournal.com/community/code_wtf/15376.html

« Java :: Invoke static... || Java :: Fragment of... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home