Menu

Setdescription String Str Setunit Int Num Mutor Methods Class Inventoryltem Void Setdescri Q43824647

setDescription(String str) and setUnit(int num) are the mutor methods of class Inventoryltem void setDescription (String str)

setDescription(String str) and setUnit(int num) are the mutor methods of class Inventoryltem void setDescription (String str) void setDescription (String str) Description = str; Description = str; The following statement creates an Inventoryltem array: Inventoryltem[] items = new Inventoryltem[5]; Is it correct or not to execute the following statements? If it is not correct, write the correct one a. items[0].setDescription(“Hammer”); b. items.setUnit(10); Show transcribed image text setDescription(String str) and setUnit(int num) are the mutor methods of class Inventoryltem void setDescription (String str) void setDescription (String str) Description = str; Description = str; The following statement creates an Inventoryltem array: Inventoryltem[] items = new Inventoryltem[5]; Is it correct or not to execute the following statements? If it is not correct, write the correct one a. items[0].setDescription(“Hammer”); b. items.setUnit(10);

Expert Answer


Answer to setDescription(String str) and setUnit(int num) are the mutor methods of class Inventoryltem void setDescription (String…

OR