Find Interview Questions for Top Companies
Ques:- What is immutable object?
Right Answer:
An immutable object is an object whose state cannot be modified after it is created. Any changes to its data result in the creation of a new object rather than altering the existing one.
Ques:- Define static block?
Asked In :-
Right Answer:
A static block in Java is a block of code that is executed when the class is loaded into memory, before any objects of the class are created. It is used to initialize static variables or perform any setup that needs to occur only once.
Ques:- What do you mean by a WAR file?
Right Answer:
A WAR file (Web Application Archive) is a packaged file format used to distribute a web application in Java. It contains all the resources needed for the application, such as Java classes, libraries, and configuration files, and is typically deployed on a web server or application server.
Ques:- What is JRE i.e. Java Runtime Environment?
Asked In :- Clover Technologies,
Right Answer:
JRE, or Java Runtime Environment, is a software package that provides the necessary libraries and components to run Java applications. It includes the Java Virtual Machine (JVM), core libraries, and other resources needed for executing Java programs.
Ques:- What do you mean by Comparable Interface?
Right Answer:
The Comparable interface in Java is used to define a natural ordering for objects of a class. It requires the implementation of the `compareTo(T o)` method, which compares the current object with another object of the same type and returns a negative integer, zero, or a positive integer based on the comparison result.
Ques:- What is Set Interface?
Asked In :- WDS,
Right Answer:
The Set interface in Java is a collection that does not allow duplicate elements and has no defined ordering. It is part of the Java Collections Framework and is implemented by classes like HashSet, LinkedHashSet, and TreeSet.
Ques:- What do you mean by JAR file?
Asked In :- ktp, argusoft,
Right Answer:
A JAR file (Java Archive) is a package file format used to aggregate multiple Java class files, metadata, and resources (like images and libraries) into a single file for easier distribution and deployment of Java applications.
Ques:- Tell me about TreeSet?
Asked In :- vertisystem,
Right Answer:
A TreeSet in Java is a collection that implements the Set interface and stores elements in a sorted order. It uses a Red-Black tree structure, which ensures that the elements are unique and sorted according to their natural ordering or a specified comparator. TreeSet does not allow null elements and provides O(log n) time complexity for basic operations like add, remove, and contains.
Ques:- There are two water tanks X andY , X is much smaller than Y. While water fills at the rate of 1 liter every hour in X, it gets filled up like, 10, 20, 40, 80, 160 in tank Y. (At the end of first hour, Y has 10 liters, second hour it has 20 liters and so on). If tank Y is 1/32 filled of the 21 hours, what is total duration of hours required to fill it completely?
Asked In :-
Right Answer:
The total duration required to fill tank Y completely is 26 hours.
Comments
Grace Nov 25, 2020

1/32(x)L=21h
10L=1h
X=21x10x32
=6720 Liters
Thus:
6720L=Yh
10L=1h
Yh=6720/10
Y=672h

Ques:- 9 years ago I was five times as old as my eldest son Today I am 3 times his age. HOW old am I now?
Asked In :- argusoft,
Right Answer:
You are 36 years old now.
Comments
Aftab Nov 9, 2022

=> 3s = d
=> 5(s-9) = d

therefore
5s-45=3s
2s = 45
s=22.5

hence
d= 67.5

Alice Aug 14, 2022

x=3y means,
3y-9=5(y-9)
3y-5y=-45+9
-2y=-36
so y=-36/-2
y=18

RRS Nov 18, 2021

54

x-9 = 5(y-9) {x=dads age, y=sons age today)
and today, x=3y
=> y = 18 and hence x =54

----

Ques:- After the typist writes 40 letters and addresses 40 envelopes, she inserts the letters randomly into the envelopes (1 letter per envelope). What is the probability that exactly 1 letter is inserted in an improper envelope’?
Asked In :-
Right Answer:
The probability that exactly 1 letter is inserted in an improper envelope is 0. The only way to have exactly 1 letter in the wrong envelope would mean that the other 39 letters must also be in the wrong envelopes, which is not possible.
Comments
sk Aug 14, 2022

zero - as one letter cant be wrong - atleast two are to be wrong

Ques:- What is the next number in the series 4, 9, 25, 49,……
Asked In :-
Right Answer:
121
Comments
Balita Aug 17, 2021

121 I. e it is Prime numbers square

Scott Patrick Sullivan Apr 30, 2021

121

Ques:- A man’s speed with the current is 15 km/hr and the speed of the current is 2.5 km/hr. What is the man’s speed against the current?
Asked In :-
Right Answer:
The man's speed against the current is 12.5 km/hr.
Ques:- The difference between the ages of two of my three grandchildren is 3. My eldest grandchild is three times older than the age of my youngest grandchild and my eldest grandchild’s age is two years more than the ages of my two youngest grandchildren added together. How old is my eldest grandchild?
Asked In :-
Right Answer:
The eldest grandchild is 12 years old.
Ques:- The sum of three consecutive even numbers is 36.What is the middle number?
Asked In :- argusoft,
Right Answer:
The middle number is 12.
Comments
C nol Aug 24, 2022

Is it not 24?

ANCHAL PHUTELA Jul 21, 2021

sum of three cnsecutive numbers = 36 (given)
let three consecutive numbers be x-1,x,x+1
This implies 3x=36
x=12
Required middle number is 12



AmbitionBox Logo

What makes Takluu valuable for interview preparation?

1 Lakh+
Companies
6 Lakh+
Interview Questions
50K+
Job Profiles
20K+
Users