Which lines contain the fields?
public class Test { private final int SHIRTS = 24; private int numPants= 14; private int tanks =0; public...
Searching for: multiple choice
Which lines contain the fields?
public class Test { private final int SHIRTS = 24; private int numPants= 14; private int tanks =0; public...
Which lines contain the constructor?
public class Test() { private final int SHIRTS = 24; private int numPants= 14; private int tanks =0;...
What is the scope of the variable spicy?
int peper = 7; int cumin = 17; if ((pepper>5) && (cumin < 20)) { int spicy = 10;...
What is the scope of the variable cumin?
int peper = 7; int cumin = 17; if ((pepper>5) && (cumin < 20)) { int spicy = 10;...
What loop would you use to increase the adult years once the age reaches 18?
What value is stored in myInt
after casting happens during the assignment in the second line of code.
double myDouble = 9.55; int myInt =...
What value is stored in myDouble
after casting happens during the assignment in the second line of code?
int myInt = 9; double myDouble =...
The code below finds the largest number in an int
array. What is the growth rate, Big O(), of this method?
// Return the position of...
The code below finds a specific number in an int
array. What is the growth rate, Big O(), of this method, on average?
static int...
The code below finds a specific number in an int
array. What is the best case estimation for performance, Big O(), for this method?
...
The code below finds a specific number in an int
array. What is the worst case estimation for performance, Big O(), for this method?
...
The code below counts the number of elements that appear in duplicate in an array. Which of the folowing statements are true?
static int...
For this question, assume we have a stack created and stored in the variable s
. This stack supports the usual push()
, pop()
, and clear()
...
For this question, assume we have a stack created and stored in the variable s
. This stack supports the usual push()
, pop()
, and clear()
...
For this question, assume we have a stack created and stored in the variable s
. This stack supports the usual push()
, pop()
, and clear()
...
For this question, assume we have a stack created and stored in the variable s
. This stack supports the usual push()
, pop()
, and clear()
...
Using this class definition:
public class node<E> { //... instance variables public node(E d, node<E> n) { this.data = d;...
Using this class definition:
public class node<E> { //... instance variables public node(E d, node<E> n) { this.data = d;...
Using this class definition:
public class node<E> { //... instance variables public node(E d, node<E> n) { this.data = d;...
Using this class definition:
public class node<E> { //... instance variables public node(E d, node<E> n) { this.data = d;...
Using this class definition:
public class node<E> { //... instance variables public node(E d, node<E> n) { this.data = d;...
Using this class definition:
public class node<E> { //... instance variables public node(E d, node<E> n) { this.data = d;...
Using this class definition:
public class node<E> { //... instance variables public node(E d, node<E> n) { this.data = d;...
Finish the for loop below. This method should return a string containing the first n
multiples of 3 concatenated together. use a loop...
The animated image below shows a traversal of a binary tree. Which type of traversal is it?