b) Grouping related ideas into a single unit referred to by one name.
c) Invoking the method.
this keyword in a Java class?b) To refer to the current instance of the class.
attributeName: TypeType attributeNameattributeName()Type: attributeNamea) attributeName: Type
b) To initialize the object’s state with specific values.
Dog object with the name “Rusty”, color “red”, and then call dog.getName() if getName() is an accessor method?a) “Rusty”
main method in a Java class?b) To act as the entry point of the program.
object1 = object2;?object1 will be a copy of object2.object1 will refer to a new instance of the class.object1 will refer to the same memory location as object2.object2 will be set to null.c) object1 will refer to the same memory location as object2.
c) An ArrayList’s size can dynamically change.
a) Foundation domain.
b) A class with general attributes like name and address.
ArrayList of String in Java?ArrayList<String> myList = new ArrayList<String>();String[] myList = new ArrayList();ArrayList myList = new String[10];ArrayList<String> myList = new String[10];a) ArrayList<String> myList = new ArrayList<String>();</String></String>
ArrayIndexOutOfBoundsException in Java?b) Accessing an element beyond the end of the array.
ArrayList when it comes to adding or removing elements?b) Arrays do not have built-in methods to add or remove elements.
b) When you assign one reference variable to another, they both refer to the same object in memory.
printStudentDetails and it prints out the student’s name and ID, what kind of method is it?d) None of the above - It’s likely a method for displaying or printing information rather than getting or setting it.
ArrayList method remove(int index) do?c) It removes the element at the specified index.
b) To initialize a new object with default or given values.
c) Polymorphism
Dog class example from the slides, what will be the output of calling dog321.chase("cat", 5, 20); assuming chase method is properly implemented to print the chase action?chase method in the Dog class.d) The actual output depends on the implementation of the chase method in the Dog class.