What three java.util classes implement the List interface? - Answers Vector/LinkedList/ArrayList
Is the following description a Merge Sort or Quick Sort?
This sort begins by breaking the original list into to partitions (sections) based on the value of some
"pivot value." once Partition will evntually contail all the elements with values greater than the pivot
value. The other will eventually contain all the elements with values less than or equal to the pivot
value. Repeat on each partition. - Answers Quick Sort
(This is a refer to code question therefore just memorize this one)
How you would write the header (signature) for the Triangle class so that it inherits the Polygon class? -
Answers public class Triangle extends Polygon
(This is a refer to code question therefore just memorize this one)
Assume that the Triangle class inherits the Polygon class, that ply is a Polygon object, and that tri is a
Triangle object. furthermore, assume that all these objects have been created and are used from within
some other class that is unrelated to the Triangle and Polygon classes. Is the following legal?
tri.numVertices( ) - Answers No
(This is a refer to code question therefore just memorize this one)
tri.perimeter( ) - Answers Yes
(This is a refer to code question therefore just memorize this one)
ply.area( ) - Answers Yes
(This is a refer to code question therefore just memorize this one)
, tri.side1( ) - Answers Yes
(This is a refer to code question therefore just memorize this one)
ply.numVertices - Answers No
(This is a refer to code question therefore just memorize this one)
ply.side3( ) - Answers No
What Big O value does a time complexity analysis of the following code yield?
for(int j =1; j <= n; j*=2)
{
for(k = 0; k < n + 100; k++)
{
...some code...
}
{ - Answers O(nlog n)
Show how to convert int i into a binary String. - Answers String s = Integer.toBinaryString(i);
What is the value of 5! (five factorial)? - Answers None of these
Static Methods are sometimes called what kind of methods? - Answers None of these
Is the following a Selection Sort of an Insertion Sort?
(Not gonna type out all of the code)
public static void sort(int a{}) {
int x, j;