Menu

Can someone beat this...

2003-11-07
2022-01-18
  • Bernd Jansen

    Bernd Jansen - 2003-11-07

    Hello,

    found these lines in a codereview...

    if (lastName.charAt(0) == new String("*").charAt(0)
    || lastName.charAt(0) == new String("%").charAt(0)) {
        .........
    }

    regards
    Bernd

     
    • Tom Copeland

      Tom Copeland - 2003-11-13

      Gack!

       
    • Raymond Smith

      Raymond Smith - 2005-08-18

      Impressive :-) How about this one?

      if ( longName == null)
      {
      org.setLongName(null);
      }
      else
      {
      org.setLongName(longName);
      }
      if (shortName == null)
      {
      org.setShortName(null);
      }
      else
      {
      org.setShortName(shortName);
      }
      // and so on ...

       
      • Tom Copeland

        Tom Copeland - 2005-08-18

        Lovely!

         
  • Erwin lagu

    Erwin lagu - 2022-01-18

    interested

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.