Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 (0.66 points) return new Command (wordi, word2); This statement returns O a Command object 0 1 word object 2 word objects O a

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Question 1 (0.66 points) return new Command (wordi, word2); This statement returns O a Command object 0 1 word object 2 word objects O a String object O a boolean value Question 2 (0.66 points) Choose the best answer. In the following statement, what is 'raceCars'? for (Car car : raceCars) { // body not shown O a Car object O a Race Car object O a String object O a boolean value O an ArrayList Question 3 (0.66 points) In the statement System.out.println("Hello, World"); what is "Hello, World"? Check all that apply. a String a local variable O a parameter to a method O a return value Question 4 (0.66 points) Which expression(s) always evaluate to true if the String variable str is equal to the string "abc"? Check all that apply. O "abc".equals(str) Ostr.equals("abc") "abc" == str Ostr == "abc" Question 5 (0.66 points) Which of the following defines a constant? O public static int COUNT = 0; O public static final int COUNT = 0; O public static void COUNT(); Opublic int COUNT = final; Question 6 (0.66 points) Consult the Java API for java.lang.String. Which method call will return the letter 'd' from the String "radar" assuming the following declaration: String word = "radar"; O word.indexOf('d') O word.lastIndexOf('d') Oword.matches("d") Oword.charAt(2) O All of the above Question 7 (0.66 points) Consider interface vs. implementation. The implementation of a method is given by O its javadoc documentation O its signature O its body O its name Question 8 (0.66 points) In the statement System.out.println("Hello, World"); what is System? O a local variable O a field O an object a class Question 9 (0.66 points) "abcdefg".substring(2,4).replace('e','q').charAt(1) This expression evaluates to Question 10 (0.66 points) Which of the following is not a principle of good design? High cohesion Tight coupling O Responsibility-driven design O Proper encapsulation

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions