Question: You should not define a class field that is dependent upon the values of the fields _____. a) in order to avoid having stale data
You should not define a class field that is dependent upon the values of the fields _____. a) in order to avoid having stale data b) because it is redundant c) because it should be defined in an other class d) in order to keep it current The scope of a private instance field is a) the instance methods of the same class b) inside the class, but not inside any method c) inside the parentheses of the method header d) the method in which they are defined A constructor is a method that is automatically called when an object is create a) True b) False A constructor a) always accepts two arguments b) has return type of void c) has the same name as the class d) always has an access specifier of private Which of the following statements will create a reference, str, to the string, "Hello, World" a) String str = "Hello, World"; b) string str = "Hello, World"; c) String str = new "Hello, World"; d) str = "Hello, World"; Two or more methods in a class may have the same name as long as a) they have different return types b) they have different parameter lists c) they have different return types, but the same parameter list d) you cannot have two methods with the same name A class specifies the _____ and _____ that a particular type of object has. a) relationships; methods b) fields; object names c) fields, methods d) relationships; object names
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
