程序代写代做 Java Name:

Name:

Part 1

Write your answers on a separate answer sheet.

• In Java, if the visibility modifier protected is specified for an instance variable in a class A, it is accessible from a subclass of A. True or False?
• In Java, an abstract class cannot be instantiated. True or False?
• In Java, a subclass can have a method that has the same name as a method defined in its superclass. True or False?
• In Java, a static method defined in a class A is associated with an object of type A.
True or False?
• In Java, when we declare a variable of a generic class, we must pass an actual type parameter (or parameters). True or False?
• In Java, when you create an object of the ArrayList class, the number of elements you can store in it is fixed. True or False?
• In Java, a nested class must be always declared private. True or False?
• This question is about comparing two arrays x and y in Java. “x.equals(y)” tests whether x and y refer to the same array instance. True or False?
• The clone method defined in Java’s Object class creates a shallow copy. True or False?
• In Java, casting from int to double is known as a narrowing cast. True or False?