Pregunta 1
Pregunta
What are two parts of ADT?
Respuesta
-
Private and Public
-
ArrayList and Vector
-
Queue and Stack
-
Parent and Child
-
Int and float
Pregunta 2
Pregunta
Which of them has more methods?
Pregunta 3
Pregunta
The relationship when one class is a subclass of another is called...
Pregunta 4
Pregunta
The relationship when one class is defined inside the definition of another is called...
Respuesta
-
has-a
-
is-a
-
is-b
-
has-b
-
to-c
Pregunta 5
Pregunta
Redefinition of method of superclass in a subclass with the same name and number of parameters is...
Respuesta
-
Override
-
Overload
-
Overhead
-
Upperload
-
Overbeat
Pregunta 6
Pregunta
Redefinition of method with the same name but different number of parameters is called...
Respuesta
-
Overload
-
Override
-
Overflow
-
Upperride
-
Download
Pregunta 7
Pregunta
If you want to call the constructor of superclass you would use....
Respuesta
-
super.
-
super()
-
this.
-
this()
-
constructor()
Pregunta 8
Pregunta
If you want to call data member of superclass you would use...
Respuesta
-
super.
-
super()
-
this()
-
this.
-
method()
Pregunta 9
Pregunta
If you want to call different constructor of current class you would use...
Respuesta
-
this()
-
this.
-
super()
-
super.
-
current.
Pregunta 10
Pregunta
If there is at least one abstract method in a class, that class is called...
Respuesta
-
Abstract class
-
General class
-
Recursive class
-
Tired class
-
Vanish class
Pregunta 11
Pregunta
If there are no abstract methods in the class we call that class…
Respuesta
-
Abstract class
-
Actual class
-
Super class
-
Non Abstract class
-
Funny class
Pregunta 12
Pregunta
Which part is accessible to user ?
Respuesta
-
Public
-
Private
-
Protected
-
Social
-
Interactive
Pregunta 13
Pregunta
Is it possible to inherit from multiple classes?
Pregunta 14
Pregunta
Is it possible to implement multiple interfaces?
Pregunta 15
Pregunta
Every class has _____as a superclass
Respuesta
-
Object
-
JAVA
-
Subject
-
Main
-
String
Pregunta 16
Pregunta
This method returns a string that textually represents an object
Respuesta
-
toString()
-
equals()
-
toText()
-
toGo()
-
hashCode()
Pregunta 17
Pregunta
InstanceOf used to test ...
Respuesta
-
Whether an object belongs to class or not
-
Whether object is object or not
-
Whether object plays football or not
-
Whether object has parent or not
-
Whether is the biggest object or not
Pregunta 18
Pregunta
What is not perfect in this code: ave = sum/count;
Respuesta
-
Division by zero may occur
-
Multiplication by 1000000 is impossible in JAVA
-
Semicolon needed after =
-
ave should be written as average
-
It is not JAVA code
Pregunta 19
Pregunta
Attempt to convert a string that is not numeric to a number faults …
Pregunta 20
Pregunta
Attempt to access array element using index less than zero folds
Pregunta 21
Pregunta
________ exception is an error normally due to programmer
Respuesta
-
checked
-
unchecked
-
broken
-
cracked
Pregunta 22
Pregunta
________ exception is an error normally not due to programmer
Respuesta
-
checked
-
unchecked
-
hacked
-
frozen
-
cracked
Pregunta 23
Pregunta
Which part is not accessible to user ?
Respuesta
-
private
-
shifted
-
controlled
-
based
-
public
Pregunta 24
Pregunta
How to handle exceptions?
Pregunta 25
Pregunta
Which of the following is not example of visibility in Java ?
Respuesta
-
private
-
public
-
protected
-
package
-
eclipsed
Pregunta 26
Pregunta
Returns the reference to the element at position index
Respuesta
-
get(index)
-
set(index)
-
has(index)
-
goTo(index)
-
fly(index)
Pregunta 27
Pregunta
Get the size of ArrayList
Respuesta
-
size()
-
size(list)
-
sizeOf()
-
length
-
length(list)
Pregunta 28
Pregunta
Sets the element on position Index to reference entry
Respuesta
-
set(index, entry)
-
setTo(index, entry)
-
index.set(entry)
-
entry.set(index)
-
set.index(entry)
Pregunta 29
Pregunta
Public xxx(int index){
return theData[index];
}
this behavior is similar to which method of ArrayList class?
Pregunta 30
Pregunta
What is the time complexity of insert(index) method in ArrayList
Respuesta
-
O(n)
-
O(1)
-
O(logn)
-
O(n^2)
-
O(m*n)
Pregunta 31
Pregunta
What is the difference between ArrayList and Vector?
Respuesta
-
Vector is synchronized, where ArrayList is not
-
Vector is scalable, where ArrayList is not
-
Vector is flexible, where ArrayList is not
-
Vector is resizable, where ArrayList is not
-
There is no difference
Pregunta 32
Pregunta
for(int i = 0; i < size; i++) {
If(theData[i] == entry) {
Return i;
}
Return -1;
}
This method is similar to which method of ArrayList
Respuesta
-
indexOf(entry)
-
get(entry)
-
set(entry)
Pregunta 33
Pregunta
Indicate constant time complexity in terms of Big-O notation
Respuesta
-
O(1)
-
O(n)
-
O(n^2)
-
O(const)
-
O(logn)
Pregunta 34
Pregunta
The collection of abstract methods is called ...
Respuesta
-
Interface
-
Abstract class
-
Class
-
Method
-
Function
Pregunta 35
Pregunta
Indicate logarithm time complexity in terms of big-O notation?
Respuesta
-
O(logn)
-
O(n^2)
-
O(n)
-
O(1)
-
O(done)
Pregunta 36
Pregunta
Indicate linear time complexity in terms of big-O notation?
Respuesta
-
O(n)
-
O(n^2)
-
O(n^3)
-
O(logn)
-
O(loglogn)
Pregunta 37
Pregunta
Indicate exponential time complexity in terms of big-O notation?
Respuesta
-
O(2^n)
-
O(n^2)
-
O(logn)
-
O(n)
-
O(n^4)
Pregunta 38
Pregunta
Find the slowest time
Respuesta
-
O(n!)
-
O(2^n)
-
O(n)
-
O(n^4)
-
O(100)
Pregunta 39
Pregunta
What is the time complexity of ArrayList remove(index) method
Respuesta
-
O(n)
-
O(1)
-
O(n * n)
-
O(logn)
-
O(n^3)
Pregunta 40
Pregunta
What is the time complexity of adding an item in front of a LinkedList
Respuesta
-
O(1)
-
O(n)
-
O(n^2)
-
O(n^3)
-
O(nlogn)
Pregunta 41
Pregunta
What is the time complexity of adding element in the beginning of ArrayList
Respuesta
-
O(n)
-
O(1)
-
O(logn)
-
O(nlogn)
-
O(n^2)
Pregunta 42
Pregunta
Which method searches for target and returns its position in LinkedList?
Respuesta
-
indexOf(target)
-
get(target)
-
set(target)
-
equal(target)
Pregunta 43
Pregunta
Indicate polynomial time complexity
Pregunta 44
Pregunta
How to remove item from LinkedList?
Respuesta
-
Change Link of previous item to next item of item to be removed
-
Change Link of next item to previous item of item to be removed
-
Change Link of removing item to next
-
Change Link of removing item to previous
-
Go home and cry
Pregunta 45
Pregunta
What is attribute of CircularList
Respuesta
-
Next of last item referencing to the first item
-
Next of first item referencing to the last item
-
Prev of last item referencing to the last item
-
Next of best item referencing to the worst item
-
I need to go home and prepare this
Pregunta 46
Pregunta
Which of the following in Java is very similar to “contract” ?
Respuesta
-
Interface implementation
-
Class inheritance
-
Method overloading
-
Class overriding
Pregunta 47
Pregunta
List iterator and iterator is the same thing in JAVA
Pregunta 48
Pregunta
Is it possible to traverse containing of a list this way?
for(int nextInt : aList) {… }
Respuesta
-
Yes
-
No
-
May be
-
I don't know
Pregunta 49
Pregunta
Show the method which exists in a DoubleLinkedList and not exist in a SingleLinkedList
Respuesta
-
constructor
-
next()
-
hasNext()
-
previous()
-
hasBefore()
Pregunta 50
Pregunta
What relationship class Node and LinkedList have?
Respuesta
-
is-a
-
has-a
-
Is-b
-
to-c
-
They are couple
Pregunta 51
Pregunta
Which of them is NOT an example of Data Structure ?
Respuesta
-
Breadth First Search
-
ArrayList
-
Graph
-
Priority Queue
-
Set
Pregunta 52
Pregunta
Which of them is NOT feature of collection interface ?
Respuesta
-
Graph
-
Set
-
List
-
Queue
-
Vector
Pregunta 53
Pregunta
This returns TRUE if the collection contains object
Respuesta
-
contains(obj)
-
IndexOf(obj)
-
IndexF(obj)
-
find(obj)
-
goTo(obj)
Pregunta 54
Pregunta
Elements of a List are accessed by means of an
Respuesta
-
index
-
switch
-
position
-
loop
-
book
Pregunta 55
Pregunta
A list can ___ or ___ as items(elements) are added or removed
Respuesta
-
grow, shrink
-
flow, shrink
-
increase, grow
-
decrease, think
-
fly, sit
Pregunta 56
Respuesta
-
Object oriented programming
-
Obstacle oriented programming
-
Object oriented playing
-
Omar oriented programming
Pregunta 57
Pregunta
The Collection is a _____ of a List ?
Respuesta
-
superinterface
-
parent
-
interface
-
father
-
node
Pregunta 58
Pregunta
Which method returns an object at the top of a Stack in JAVA?
Respuesta
-
pop()
-
peek()
-
front()
-
poll()
-
top()
Pregunta 59
Pregunta
Which method adds an item on the top of a Stack in JAVA?
Respuesta
-
push()
-
add()
-
peek()
-
top()
-
bush()
Pregunta 60
Pregunta
First in last out structure is ...
Respuesta
-
Stack
-
Queue
-
Graph
-
Set
-
Tree
Pregunta 61
Pregunta
Which structure is widely used in finding palindrome?
Respuesta
-
Stack
-
Queue
-
Set
-
Map
-
Graph
Pregunta 62
Pregunta
Which structure is widely used to calculate the value of postfix expression?
Respuesta
-
Queue
-
Stack
-
Set
-
Graph
-
List
Pregunta 63
Pregunta
Calculate value of “4 7 * 20-“
Pregunta 64
Pregunta
Ability of object of one class to act like it is an object of another class
Pregunta 65
Pregunta
What does method empty return for empty stack?
Respuesta
-
True
-
False
-
Nothing
-
Empty
-
Hello
Pregunta 66
Pregunta
Waiting line of people is similar to which data structure?
Respuesta
-
Queue
-
Stack
-
Tree
-
Graph
-
LinkedList
Pregunta 67
Pregunta
If we call remove() function for the queue, which item will be removed
Respuesta
-
first
-
last
-
middle
-
second
-
third
Pregunta 68
Pregunta
Which function return first added item in the queue?
Respuesta
-
front()
-
first()
-
element()
-
goBack()
-
giveMeFirst()
Pregunta 69
Pregunta
Which function is used to add new item in the queue?
Respuesta
-
offer()
-
suffer()
-
add()
-
poll()
-
remove()
Pregunta 70
Pregunta
First-in first-out data structure ...
Respuesta
-
Queue
-
Stack
-
Set
-
Graph
-
List