Islami Bank Officer Exam 2019 — Question Solution | ইসলামী ব্যাংক অফিসার নিয়োগ পরীক্ষা ২০১৯ — প্রশ্ন সমাধান
- Islami Bank
- Officer
- 2019
- 10 questions · 0 MCQ, 10 written
Page updated
ARBS Academy · itjobs.arbsacademy.com
About this exam paper · প্রশ্নপত্র পরিচিতি
The Islami Bank Officer exam was held in 2019. The paper had 10 written questions. The subjects asked most were Programming (8) and Database (2). This page lists every question, with 2 answered and explained; the rest of the answers open with a free ARBS Academy account, where the paper can also be practised as a timed test.
ইসলামী ব্যাংক অফিসার নিয়োগ পরীক্ষার (২০১৯) এই প্রশ্নপত্রে ১০টি প্রশ্ন ছিল, বেশিরভাগ প্রোগ্রামিং ও ডেটাবেজ থেকে। এখানে ২টি প্রশ্নের ব্যাখ্যাসহ উত্তর দেওয়া আছে; বাকিগুলো ফ্রি অ্যাকাউন্টে খোলে।
- Organisation
- Islami Bank
- Post
- Officer
- Exam date
- 2019
- Questions
- 10 (0 MCQ, 10 written)
- Exam guide
- Bank IT jobs · ব্যাংকের আইটি চাকরি
What are the difference among JDK, JRE and JVM?
Model answer
JDK, JRE and JVM are nested layers of the Java platform: JDK ⊃ JRE ⊃ JVM.
- JVM (Java Virtual Machine): an abstract machine that loads
.classbytecode, verifies it and executes it, by interpreting it and by JIT-compiling frequently used code to native machine code, while managing memory with garbage collection. It does not compile.javasource code. - JRE (Java Runtime Environment): JVM + the standard class libraries (
java.lang,java.util,java.io…) and supporting files: everything needed to run an already compiled Java program. - JDK (Java Development Kit): JRE + development tools such as
javac(compiler),jar,javadoc,jdb(debugger),javap,jshellandjlink: everything needed to develop, compile, debug and run Java programs.
graph TD
subgraph JDK["JDK = JRE + development tools"]
T["javac, jar, javadoc, jdb, jshell"]
subgraph JRE["JRE = JVM + class libraries"]
L["Class libraries: java.lang, java.util, java.io"]
subgraph JVM["JVM"]
X["Class loader, bytecode verifier, interpreter + JIT, garbage collector"]
end
end
end
| Aspect | JDK | JRE | JVM |
|---|---|---|---|
| Full form | Java Development Kit | Java Runtime Environment | Java Virtual Machine |
| Purpose | develop, compile, debug and run | run compiled programs | execute bytecode |
| Contains | JRE + javac, jar, javadoc, jdb … |
JVM + class libraries | class loader, verifier, execution engine (interpreter + JIT), run-time memory areas, garbage collector |
| Works on | .java source → .class (via javac) |
.class / .jar files |
bytecode instructions |
| Platform | separate build for each OS | separate build for each OS | one specification; each OS has its own implementation |
| Who needs it | programmers | users who only run Java applications | used inside the JRE/JDK, not installed on its own |
| Relation | superset of the JRE | subset of the JDK, superset of the JVM | innermost part |
Platform independence: the bytecode (.class file) is platform-independent; the JDK, JRE and JVM are not, because Windows, Linux and macOS each need their own build. The same .class file therefore runs on any OS that has a JVM ("write once, run anywhere").
Example (JDK 21)
public class Greet {
public static void main(String[] args) {
System.out.println("Bytecode running on the JVM");
}
}
javac Greet.java: the JDK's compiler createsGreet.class(bytecode).java Greet: the launcher starts a JVM, which loads, verifies and runsGreet.classand printsBytecode running on the JVM.
Step 2 needs only a runtime; step 1 needs the JDK, because javac is not part of the JRE.
Modern note: since JDK 9 the JDK no longer contains a separate jre folder, and from Java 11 Oracle no longer ships a stand-alone JRE; a trimmed runtime can be built with jlink, and some vendors (for example Eclipse Temurin) still publish JRE packages. The JDK ⊃ JRE ⊃ JVM layering is still the standard way to describe the platform.
Exam tip: "JDK to develop, JRE to run, JVM to execute"; JDK ⊃ JRE ⊃ JVM; the bytecode is platform-independent, the JVM implementation is not.
How many types of memory areas are allocated by JVM?
What is the output of the following Java program?
(i)
public class Test{
public static void main(String []args){
System.out.println(10+20+"Java");
System.out.println("Java"+10+20);
}
}
(ii)
public class Test{
public static void main(String []args){
System.out.println(10*20+"Java");
System.out.println("Java"+10*20);
}
}
(iii)
public class Test{
public static void main(String args){
for(int i=0;0;i++)
System.out.println(10*20+"Hello Java");
}
}
What is constructor? How many types of constructors are used in Java?
What is the output of the following Java program?
(i)
public class Test{
Test(int a, int b){
System.out.println("a="+a+"b="+b);
}
Test(int a, float b){
System.out.println("a="+a+"b="+b);
}
public static void main(String[] args){
byte a=10;
byte b=15;
Test test=new Test(a,b);
}
}
(ii)
class Test{
int i;
}
public class Main{
public static void main(String args[]){
Test test=new Test();
System.out.println(test.i);
}
}
(iii)
class Test{
int test_a, test_b;
Test(int a, int b){
test_a=a;
test_b=b;
}
public static void main(String args[]){
Test test=new Test();
System.out.println(test.test_a+"b"+test.test_b);
}
}
Sign up free to see the model answers to written questions 2–5 · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
What is static method? What are the restrictions that are applied to the Java static Methods?
Model answer
A static method is a method declared with the keyword static. It belongs to the class itself, not to any object, so it is called with the class name (ClassName.method()) without creating an object. It runs without any current object (there is no this), so on its own it can use only its parameters, its local variables and other static members.
Typical uses: utility methods (Math.sqrt(), Integer.parseInt()), counters shared by all objects, factory methods, and main(), which is static so the JVM can call it before any object exists (in Java 21 the launcher needs public static void main(String[] args); Java 25, JEP 512, also accepts an instance main).
class Counter {
static int created = 0; // class variable: one copy for all objects
int id; // instance variable: one copy per object
Counter() {
created++;
id = created;
}
static int total() { // static method: uses only static data
return created;
}
static double average(int a, int b) { // utility method, needs no object
return (a + b) / 2.0;
}
}
public class StaticDemo {
public static void main(String[] args) {
int before = Counter.total(); // called by class name, no object yet
System.out.println("Objects so far: " + before);
new Counter();
Counter c2 = new Counter();
System.out.println("Objects so far: " + Counter.total());
System.out.println("Last id: " + c2.id);
System.out.println("Average: " + Counter.average(7, 10));
}
}
Output:
Objects so far: 0
Objects so far: 2
Last id: 2
Average: 8.5
Counter.total() and Counter.average() run without any object; total() reads only the static field created.
Restrictions on static methods
| # | Restriction | Reason |
|---|---|---|
| 1 | Cannot directly use an instance variable | No current object exists, so "which object's field?" has no answer |
| 2 | Cannot directly call an instance method | Same reason as 1 |
| 3 | Cannot use this or super |
Both refer to the current object |
| 4 | Cannot be overridden, only hidden | A static call is bound at compile time by the reference type, not by the object |
| 5 | Cannot be abstract |
An abstract method must be overridden, which a static method cannot be |
public class Bad1 {
int marks = 75; // instance field
void show() { System.out.println(marks); }
static void report() {
System.out.println(marks); // instance field
show(); // instance method
System.out.println(this.marks);
}
public static void main(String[] args) {
report();
}
}
javac 21 output:
Bad1.java:7: error: non-static variable marks cannot be referenced from a static context
System.out.println(marks); // instance field
^
Bad1.java:8: error: non-static method show() cannot be referenced from a static context
show(); // instance method
^
Bad1.java:9: error: non-static variable this cannot be referenced from a static context
System.out.println(this.marks);
^
3 errors
Using super in a static method gives the same kind of error (non-static variable super ...), and abstract static gives illegal combination of modifiers: abstract and static.
Correct way: pass (or create) an object and go through it.
public class Fix1 {
int marks = 75;
static void report(Fix1 obj) { // object passed in explicitly
System.out.println("Marks: " + obj.marks);
}
public static void main(String[] args) {
report(new Fix1());
}
}
Output: Marks: 75
Hiding, not overriding (restriction 4):
class Parent {
static String who() { return "Parent.who"; }
String name() { return "Parent.name"; }
}
class Child extends Parent {
static String who() { return "Child.who"; } // hides, does not override
@Override
String name() { return "Child.name"; } // overrides
}
public class Hide {
public static void main(String[] args) {
Parent p = new Child();
System.out.println(p.who()); // chosen by reference type
System.out.println(p.name()); // chosen by object type
}
}
Output:
Parent.who
Child.name
The static who() is chosen by the reference type Parent; the instance name() is chosen by the actual Child object. Putting @Override on a static method is a compile error (static methods cannot be annotated with @Override), and an instance method cannot replace a static one (or the reverse).
Exam tip: define static as "belongs to the class, called without an object", then list the five restrictions: no direct instance variables, no direct instance methods, no this/super, no overriding (only hiding), no abstract.
What is this keyword in Java? What are the main uses of this keyword?
What is the Inheritance? What are the types of Inheritance in Java?
Write down five differences between DELETE and TRUNCATE statement in SQL?
Write a SQL query to get third maximum salary of an employee from a table name employee_table. Assume necessary columns of employee table.
Sign up free to see the model answers to written questions 7–10 · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Explanations © ARBS Academy
Keep going with a free account · ফ্রি অ্যাকাউন্টে যা যা করতে পারবেন
8 more answers from this paper open with a free account.
এই প্রশ্নপত্রের আরও ৮টি উত্তর, ধাপে ধাপে ব্যাখ্যাসহ, ফ্রি অ্যাকাউন্টে খুলবে।
Free account · 1 day of Premium free
Paper analysis · প্রশ্নপত্র বিশ্লেষণ
Its questions come from 3 syllabus chapters; the biggest is Object-Oriented Programming, in Programming, with 5 questions. Object-Oriented Programming is asked in 88 other papers too (2015–2026).
Its biggest topics · প্রধান টপিক
Questions in this paper, and how many of our other papers ask the topic
- Object-Oriented Programming Programming · 88 other papers, 2015–20265
- Language Basics & Syntax Programming · 122 other papers, 2015–20263
- SQL & Queries Database · 93 other papers, 2015–20262
From our own past papers: each question filed under one syllabus chapter. Practice and held questions are not counted.
Questions about this paper · সাধারণ প্রশ্ন
- How many questions were in the Islami Bank Officer exam (2019)?
- 10 written questions.
- Which subjects were asked most in the Islami Bank Officer exam (2019)?
- Programming (8) and Database (2), out of 10 questions.
- When was the Islami Bank Officer exam held?
- In 2019. The exact day isn't in our records.
- Where can I find the Islami Bank Officer exam (2019) question solution?
- On this page: 2 of the 10 questions are shown with worked answers. The rest of the answers open with a free ARBS Academy account, where the paper can also be practised as a timed test.
Question text is from the public recruitment exam; answers and explanations are written by ARBS Academy. All past papers