Question 1 Not yet answered Marked out of 1.00 Flag question Question text In a
ID: 3717848 • Letter: Q
Question
Question 1
Not yet answered
Marked out of 1.00
Flag question
Question text
In a class, which of the following should be public?
Select one:
a. Constructors
b. toString method
c. accessors methods
d. mutators methods
e. If you think all of the above should be public, select this option
Question 2
Not yet answered
Marked out of 1.00
Flag question
Question text
Which of the following is false with respect to the toString method?
Select one:
a. It must not have any parameters
b. It can be invoked on the objects of any class without causing a syntax error
c. It should return a String
d. It must dump the entire state of an object
e. If you believe none of the above are false, select this option
Question 3
Not yet answered
Marked out of 1.00
Flag question
Question text
Which of the following do thing/concept classes and driver classes have in common?
Select one:
a. They contain a main method
b. They usually contain static methods
c. They contain instance variables
d. They can contain instantiations but usually not of themselves
e. Java can begin execution with code in them
f. If you believe thing/concept classes and driver classes have none of the above in common, select this option
Question 4
Not yet answered
Marked out of 1.00
Flag question
Question text
Which of the following is/are not part of a method's signature?
Select one:
a. The method's name
b. The names of the method's parameters
c. The data types of the method's parameters
d. The order of the data types of the method's parameters
e. The method's return value
f. If you think more than one of the above are not part of a method's signature, select this option
Question 5
Not yet answered
Marked out of 1.00
Flag question
Question text
Which of the following is not a requirement of method overloading?
Select one:
a. Methods must have the same name
b. Methods must have different signatures
c. Methods must be in the same class
d. Methods must have the same return type
e. If you think all of the above are required, select this option
Question 6
Not yet answered
Marked out of 1.00
Flag question
Question text
Which of the following cannot be overloaded?
Select one:
a. Constructors
b. Public methods
c. Private methods
d. The inherited toString method
e. If you think all of the above can be overloaded, select this option
Question 7
Not yet answered
Marked out of 1.00
Flag question
Question text
Which of the following is false with respect to constructors?
Select one:
a. They cannot be invoked on an object
b. They do not have a return type
c. They can only be "called" in conjunction with the "new" keyword
d. They have the same name as their class but starting with a lower case letter
e. Java supplies one if you don't code one in a class you code
Question 8
Not yet answered
Marked out of 1.00
Flag question
Question text
Which of the following is false with respect to static methods?
Select one:
a. They can be syntactically invoked on their class's name
b. They can be syntactically invoked on any object instantiated from their class
c. They can be called from a static method of their class
d. They cannot be called from a non-static method of their class
e. Their invocation never selects an object
Question 9
Not yet answered
Marked out of 1.00
Flag question
Question text
Which of the following is false with respect to non-static variables?
Select one:
a. They must be class level
b. They can be public or private
c. They can be accessed by code in static methods of their class
d. They can be accessed by code in non-static methods of their class
e. If you think none of the above are false with respect to non-static variables, select this option
Question 10
Not yet answered
Marked out of 1.00
Flag question
Question text
Which of the following is false with respect to static variables?
Select one:
a. They must be class level
b. They can be public or private
c. They can be accessed by code in static methods of their class
d. They can be accessed by code in non-static methods of their class
e. If you think none of the above are false with respect to static variables, select this option
Explanation / Answer
1.Ans-:e.)All of above are public as all Constructors, toString method,accessors methods,. mutators methods should be public to be accessible.
2.Ans-: d. )It must dump the entire state of an object
3.Ans-:d. )They can contain instantiations but usually not of themselves
4.Ans-:e.)The method's return value.
5.Ans-:d. )Methods must have the same return type
6.Ans-:d. )The inherited toString method
7.Ans-:a.) They cannot be invoked on an object
8.Ans-:e.) Their invocation never selects an object
9.Ans-:c. They can be accessed by code in static methods of their class
10.Ans-:e. If you think none of the above are false with respect to static variables, select this option
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.