All Multiple Choice Questions
A class that is inherited in Java is called a
A ) subclass | B ) super class |
C ) static class | D ) implement class |
A |
Subject: OOP |
Exam: Sonali Bank Limited |
Which one of these interfaces is implemented by Thread class?
A ) Set | B ) Connections |
C ) Runnable | D ) None of the above |
C |
Subject: OOP |
Exam: Sonali Bank Limited |
Worst-case of Quick sort algorithm occurs when
A ) Data are sorted | B ) Data are random |
C ) Number of items is low | D ) None of the above |
B |
Subject: AD |
Exam: Sonali Bank Limited |
How can you avoid SQL Injection
A ) Using firewall | B ) Using virus protection |
C ) Using careful programming | D ) None of the above |
C |
Subject: DMS |
Exam: Sonali Bank Limited |
Which keyword must be used to inherit a class in Java?
A ) extends | B ) super |
C ) this | D ) extent |
B |
Subject: OOP |
Exam: Sonali Bank Limited |
Which of the following is the destructor for the class "Vehicle"
A ) *VehicleO | B ) *Vehide(int value) |
C ) ~Vehidef) | D ) ~Vehide(intvalue) |
C |
Subject: OOP |
Exam: Sonali Bank Limited |
Using setter and getter method is known as
A ) Encapsulation | B ) Polymorphism |
C ) Inheritence | D ) Recursion |
A |
Subject: OOP |
Exam: Sonali Bank Limited |
Which one is the most suitable for implementing a priority queue?
A ) Dequeue(double ended queue) | B ) Heap |
C ) Queue | D ) Array |
A |
Subject: DS |
Exam: Sonali Bank Limited |
What is the value of "d" after this line of code has been executed? double d = Math.round(2.5+Math.random());
A ) 2 | B ) 2.5 |
C ) 3 | D ) 4 |
C |
Subject: DCCG |
Exam: Sonali Bank Limited |
Which of the following will produce an answer that is closest in value to a double d
A ) (int)MatKmin(d) | B ) fint)Math.max(d) |
C ) (int)Math.abs(d) | D ) (int)Math.floor(d) |
D |
Subject: DCCG |
Exam: Sonali Bank Limited |
Which is not a feature of object oriented programming?
A ) Inheritance compile | B ) directives |
C ) encapsulation | D ) abstraction |
B |
Subject: OOP |
Exam: Sonali Bank Limited |
How many instances of an abstract class can be created?rnH'
A ) 0 | B ) 1 |
C ) 2 | D ) 13 |
A |
Subject: OOP |
Exam: Sonali Bank Limited |
Link list can be implemented by using?
A ) Array | B ) Pointers |
C ) both a and b | D ) None of the above |
C |
Subject: OOP |
Exam: Sonali Bank Limited |
Which of the following is a design pattern?
A ) List | B ) Queue |
C ) Factory | D ) All of the above |
D |
Subject: DS |
Exam: Sonali Bank Limited |
Why is private variables used in Java Programming?
A ) Chance of reducing misuse by the follow programmers | B ) Data loss prevention |
C ) All of the above | D ) Polymorphism |
D |
Subject: OOP |
Exam: Sonali Bank Limited |
In Java, which one will be used for comparing whether the two String object str1 and str2 are same
A ) str1 = srr2 | B ) str1.equalsignoreCase(str2) |
C ) str1==str2 | D ) All of the above |
D |
Subject: OOP |
Exam: Sonali Bank Limited |
Consider the following C program: Which of the following statements is true?
A ) This program will incur some compile errors | B ) No compile error but cannot be run |
C ) It is not a valid C program | D ) None of the above |
D |
Subject: PL |
Exam: Sonali Bank Limited |
Consider the following code : #include<stdio.h> int main(int argc, char * argv[]){ return 0;} What is the minimum length of character array in the above code?
A ) 0 | B ) 1 |
C ) Underline | D ) -1 |
C |
Subject: PL |
Exam: Sonali Bank Limited |
#include<stdio.h> is a
A ) Processor directive and resolved by compiler at the beginning phase of compilation | B ) Inline function |
C ) Constant declaration | D ) Normal c statement |
C |
Subject: PL |
Exam: Sonali Bank Limited |
Which one is modern light weight message exchange format?
A ) XML | B ) MX |
C ) JSON | D ) HTML |
D |
Subject: WE |
Exam: Sonali Bank Limited |