Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The class attributes can be from any. Behavior. Primitive datatype only Primitive datatype or object Method The ... access modifier indicates that the variable or

  1. The class attributes can be from any.
  1. Behavior.
  2. Primitive datatype only
  3. Primitive datatype or object
  4. Method

  1. The ... access modifier indicates that the variable or method can be accessed within
  1. public
  2. private
  3. protected
  4. static

  1. The method that has the same class name and has no return value is called
  1. constructor
  2. implementor
  3. method with no return value
  4. package

  1. Usually, the (a) method has a return value while the ..(b). Method takes
  1. (a)getter ,(b) setter
  2. (a)setter , (b) getter
  3. (a) setter , (b) toString
  4. None

  1. The .(a). Is used to find an element in unsorted array while the .(b).. is used in sorted array
  1. (a) Binary search , (b) Sequential search
  2. (a) selection search , (b) Sequential search
  3. (a) Sequential search , (b) Binary search
  4. (a) selection search , (b) Binary search

  1. The . Keyword indicates that only one copy of the class variable will be used for
  1. static
  2. private
  3. protected
  4. public

  1. The following code is used to swap the elements at the indexes . of the array

Student temp = A[maxLoc];

A[maxLoc] = A[lastPlace];

A[lastPlace] = temp

  1. Student and temp
  2. maxLoc and lastPlace
  3. maxLoc and temp
  4. lastPlace and temp

  1. The is used to store an array of un-known size to dynamically increase/shrink
  1. ArrayList
  2. Cart array
  3. Collections
  4. String array

  1. The . Java built-in class can be used to sort an arrayList using its method sort.
  1. ArrayList
  2. Cary array
  3. String array
  4. Collections

  1. The method .. in the ArrayList class can be used to insert an element either to the a specific location/index.
  1. contains
  2. add
  3. remove
  4. get

  1. .. appears when trying to access an array's element that its position is negative or greater than or equals to the array's length.
  1. User-defined exceptions
  2. Built-in Exception
  3. ArraysIndexOutOfBoundsException
  4. NegativeArraySizeException

  1. The value of ( first , last and mid ) to find (9) in the following list using binary search:

1, 2, 3, 4, 5, 6, 7, 8, 9, 10

  1. first = 5 , last = 9 , mid = 7
  2. first = 8 , last = 9 , mid = 8
  3. first = 5 , last = 9 , mid = 7
  4. first = 0 , last = 9 , mid = 4

  1. The appropriate statement to retrieve the second row length of a two-dimensional array ( arr) is:
  1. arr.length
  2. arr[1].length
  3. arr[0].length
  4. arr[2].length

  1. Which sentence is accurate for the following array?

int [ ] [ ] arr = { { 1 } , { 2, 3, 4}, {5, 6 } };

  1. The array has one row.
  2. The array has three rows.
  3. The array has three column.
  4. The array's length is dynamic.

  1. Array can be created by
  1. new operator
  2. user-defined class
  3. direct contents initialization
  4. all of above

  1. The next step to sort the following list using selection sort is:

52, 93, 88, 73, 3, 12

  1. 52, 93, 12, 73, 3, 88
  2. 52, 12, 88, 73, 3, 96
  3. 93, 52, 88, 73, 3, 12
  4. 12, 93, 88, 73, 3, 52

  1. When a variable is declared as final, it cannot be changed.
  1. True
  2. False
  1. Linear search is more efficient than binary search.
  1. True
  2. False

  1. The appropriate statement that will remove all elements of an arrayList (list) is
  1. list.contains()
  2. list.remove()
  3. list.clear()
  4. list.sort()

  1. In . , the order of elements is required.
  1. binary search
  2. two-dimensional array
  3. linear search
  4. arrayList

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

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

Find the extrema of ((x, y) = x2y - 6y2 - 3x2.

Answered: 1 week ago

Question

Determine how to design pay systems.

Answered: 1 week ago

Question

5. Describe how contexts affect listening

Answered: 1 week ago