Notes: 1  Gain on disposal of investments and interest income are not considered as revenue because they are not earned from the principal business activity of ABC PLC, i.e. selling stationery goods.
To assign values to the various positions in an array, you do it in the normal way: aryNums[0] = 10; Here, a value of 10 is being assigned to position 0 in the array called aryNums. Again, the square brackets are used to refer to each position.
For example: To remove an element from the list, use the remove(index) or remove(Object) method which removes the element at the specified index or by object reference. For example: 1  Remove the element at the 3 rd position in the list: 2  java.lang.IndexOutOfBoundsException is thrown.he get() method is used to retrieve an element from the list at a specified index. For example, the following code gets an element at 2 nd position in the array list and an element at 4 th position in the linked list: Note that the getFirst() and getLast() methods are specific to the LinkedList class.