Search Interview Questions
| 2679 questions in repository.|
There are more than 200 unanswered questions.
Click here and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
|Interview Questions and Answers for 'Bharti airtel' - 1 question(s) found - Order By Newest|
|Ans. We can follow the same design which we follow in singleton Classes. We can have a static counter that will keep the count of number of objects already created, We can keep the constructor private and being called through the static method. We can keep incrementing the counter before calling the constructor and put a check to call only if it's lesser than n.|
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve Bharti Airtel|
|Difference between == and .equals() ?|
|Why is String immutable in Java ?|
| Explain the scenerios to choose between String , StringBuilder and StringBuffer ?|
What is the difference between String , StringBuilder and StringBuffer ?
|What are the difference between composition and inheritance in Java?|
|What do you mean by "Java is a statically typed language" ?|
|Why do we need Inner classes ? Cant we just work with outer classes wherever we implement Inner classes ?|
|What are different ways of object creation in Java ?|
|What are points to consider in terms of access modifier when we are overriding any method?|
|What is the difference between declaration, instantiation and initialization ?|
|What are the common uses of "this" keyword in java ?|