Jump to content

Mobi Wan

Members
  • Posts

    4
  • Joined

  • Last visited

  • Donations

    0.00 GBP 

Posts posted by Mobi Wan

  1. In Java, if I try to do.equals() on a null string, a null pointer error is issued. I'm wondering whether I can perform the following if I'm attempting to compare if a string is equal to a constant string:

    MY CONSTANT STRING.equals(aStringVariable)

    I'm sure it'll work, but is this simply extremely bad code?
    This is a common Java idiom known colloquially as a Yoda condition. Personally, I prefer to handle the null situation directly, but the Yoda method is widely used, and any competent Java programmer should quickly grasp what is going on. How should I proceed?

  2. You cannot mention multiple column names with commas using ADD COLUMN. You need to mention ADD COLUMN every time you define a new column. You can utilize the SQL group by clause to organize identical data into groups. The group by single column function groups all entries that have the same value in only one column.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use