You are on page 1of 2

Questions & Answers

Q. Introduce yourself

Q. Why should we hire you?

Q. What’s your experience?

Q. What’s your expertise?

Q. For how long will you remain with us?

2nd Section
Q. How do you utilize your free time?
Q. Where do you see yourself after five years?
Q. What are your strengths and weaknesses?

Technical Portion
1) Compare method and Constructor
Ans:
• Constructor is used to initialize an object whereas method is used to exhibits
functionality of an object.
• Constructors are invoked implicitly whereas methods are invoked explicitly.
• Constructor does not return any value where the method may/may not return a
value.
• In case constructor is not present, a default constructor is provided by compiler.
In the case of a method, no default method is provided.
• Constructor should be of the same name as that of class. Method name should
not be of the same name as that of class.

2) What is a singleton class?


Ans:
In object-oriented programming, a singleton class is a class that can have only one
object (an instance of the class) at a time

3) What is the highest operator precedence in Java?


Ans:
Java has well-defined rules for specifying the order in which the operators in
an expression are evaluated when the expression has several operators. () and []
have the highest precedence in Java.

4) Difference between C and C++?


Ans:
The major difference between C and C++ is that C is a procedural programming
language and does not support classes and objects, while C++ is a combination
of both procedural and object oriented programming language; therefore C++ can
be called a hybrid language.
5) What is a compiler?
Ans:
A compiler is a computer program that translates computer code written in one
programming language into another language. The name compiler is primarily
used for programs that translate source code from a high-level programming
language to a lower level language to create an executable program.

You might also like