Search Interview Questions | More than 3000 questions in repository. There are more than 900 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 'Credit suisse' - 6 question(s) found - Order By Newest | ||||
Basic and Very Frequently asked. | ||||
| ||||
Ans. Polymorphism means the condition of occurring in several different forms. Polymorphism in Java is achieved in two manners 1. Static polymorphism is the polymorphic resolution identified at compile time and is achieved through function overloading whereas 2. Dynamic polymorphism is the polymorphic resolution identified at runtime and is achieved through method overriding. | ||||
Sample Code for overloading Sample Code for overriding | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  polymorphism  object oriented programming (oops)  oops concepts  oops concepts Asked in 108 Companies Basic   frequent | ||||
Try 2 Question(s) Test | ||||
| ||||
Ans. Java doesn't support multiple inheritance. Interfaces does't facilitate inheritance and hence implementation of multiple interfaces doesn't make multiple inheritance. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   oop   oop concepts   inheritence   multiple inheritence   basic interview question Asked in 10 Companies basic   frequent | ||||
Try 1 Question(s) Test | ||||
| ||||
Ans. class A { void test() { System.out.println("test() method"); } } class B { void test() { System.out.println("test() method"); } } Suppose if Java allows multiple inheritance like this, class C extends A, B { } A and B test() methods are inheriting to C class. So which test() method C class will take? As A & B class test() methods are different , So here we would Facing Ambiguity. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  multiple inheritance  object oriented programming (oops)  oops concepts  diamond problem Asked in 20 Companies basic   frequent | ||||
| ||||
Ans. DEBUG ERROR ALL WARN INFO FATAL OFF TRACE TRACE_INT WARN | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   log4j   log4j level   logging   error logging Asked in 10 Companies | ||||
| ||||
Ans. log4j is by apache while java logging api is given by sun. log4j is more powerful,extensible and simple to use than java logging api. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   Asked in 1 Companies | ||||
| ||||
Ans. There was no multiple inheritance in java before version 8 as implementing multiple interfaces cannot be termed as inheritance. With Java 8 , came the concept of default methods wherein the class implementing the interface carries the default implementation from the interface and hence facilitating multiple inheritance. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  multiple inheritance  object oriented programming (oops)  oops concepts   inheritance  object oriented programming (oops)  oops concepts   oops concept Asked in 10 Companies   frequent | ||||