2324252627282930313233
Item item = null; switch (type) { case OTHERS: item = new TaxedItem(type, name, quantity, imported, price); break; default: item = new NotTaxedItem(type, name, quantity, imported, price); break;