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 - Order By Newest | ||||
| ||||
Ans. Map | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  hadoop   map reduce | ||||
| ||||
Ans. 1 | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  hadoop   hadoop cluster | ||||
| ||||
Ans. TaskNode | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  hadoop   hadoop cluster | ||||
| ||||
Ans. The field of an object | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   oops   oop   instance variable   variables | ||||
Ans. Runtime Polymorphism | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  static class   static vs singleton   java   oops   objects  Runtime Polymorphism | ||||
Ans. A Sequence File contains a binary encoding of an arbitrary number key-value pairs. Each key must be the same type. Each value must be of same type. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  hadoop   bigdata   big data | ||||
Ans. One key and associated values. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  hadoop   bigdata   big data   map-reduce   map reduce   reduce function | ||||
| ||||
Ans. Java | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  hadoop   bigdata   big data   map-reduce   map reduce framework | ||||
| ||||
Ans. No. It will result in infinite loop | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  loop  for loop  java | ||||
Must know at all levels. Among Top 10 frequently asked questions in Java. Very frequently asked to fresh graduates or less experienced professionals. | ||||
| ||||
Ans. Its a facility for code reuse and independent extension wherein a derived class inherits the properties of parent class. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  inheritance  object oriented programming (oops)  oops concepts  oops concepts  java concepts  code reuse  code re-use   classes  derived classes Asked in 14 Companies basic   frequent | ||||
| ||||
Ans. Static polymorphism is the polymorphic resolution identified at compile time and is achieved through function overloading whereas dynamic polymorphism is the polymorphic resolution identified at runtime and is achieved through method overriding. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  static polymorphism  object oriented programming (oops)  oops concepts   dynamic polymorphism  object oriented programming (oops)  oops concepts   polymorphism  object oriented programming (oops)  oops concepts   overloading   overriding   broadridg Asked in 1 Companies basic   frequent | ||||
| ||||
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 | ||||
| ||||
Ans. Distributed file system and Map Reduce system. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  hadoop  bigdata  hadoop system components   frequent | ||||
| ||||
Ans. Hadoop is an open source framework , written in java by apche software foundation. This framework is used to write applications to process vast amount of data. Processing happens in parallel on large clusters which could have 1000 of computers. It processes data in a very reliable and fault tolerant manner. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  Hadoop framework  BigData | ||||
| ||||
Ans. Combiners are used to increase the efficiency of a Map Reduce program. They are used to aggregate intermediate map output locally on individual mapper outputs. Combiners can help you reduce the amount of data that needs to be transferred across to the reducers. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  Hadoop Systems  BigData   hadoop combiners Asked in 1 Companies | ||||
Very Frequently asked to fresh graduates and less experienced. | ||||
| ||||
Ans. Abstraction Polymorphism Inheritance Encapsulation | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  oops  oops concepts Asked in 1 Companies basic   frequent | ||||
| ||||
Ans. Multi Level Inheritance is multi level hierarchy of classes. Here is the example - http://www.buggybread.com/2015/09/java-se-class-diagram-classes-that_603.html Class RoleList extends ArrayList which in turn extends AbstractList which in turn extends AbstractCollection. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  multilevel inheritance  object oriented programming (oops)  oops concepts  inheritance  object oriented programming (oops)  oops concepts  oops concepts Asked in 3 Companies basic | ||||
Try 1 Question(s) Test | ||||
| ||||
Ans. Default methods results in multiple inheritance of behavior and not of state. In case we try to implement multiple interfaces with default method having same name and signature, and don't override it in implementation class, it will throw an error. For example - interface MyInterface { public void default myMethod(){ } } interface MyInterface2 { public void default myMethod(){ } } class MyClass implements MyInterface,MyInterface2 { } This code will compilation error "Duplicate Default Method" if we specify the definition of myMethod() in myClass, compiler won't complain and there is no conflict and MyClass can use overridden definition. But if we don't override myMethod() in MyClass, Java would be in conflict as to what definition should be carried to MyClass and hence throws compilation error. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  default methods  java 8  multiple inheritance  object oriented programming (oops)  oops concepts  diamond problem   interfaces | ||||
| ||||
Ans. No, If both Parent and Derived are outer classes. public class Vehicle { private static String manufacturingDate = "2016"; } public class Car extends Vehicle{ public static void main(String args[]){ System.out.println(manufacturingDate); // error - The field Vehicle.manufacturingDate is not visible } } Yes, If derived is the inner class of Parent. public class Vehicle { private static String manufacturingDate = "2016"; static public class Car extends Vehicle{ public static void main(String args[]){ System.out.println(manufacturingDate); // no problem } } } | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  private members   private methods   private variables   inheritance  object oriented programming (oops)  oops concepts   members visibility   inner classes  nexted classes basic   frequent | ||||
| ||||
Ans. Multiple Inheritance refers to the concept of a class inheriting multiple classes. Example - Class C extends Class A ,Class B. This is not allowed in Java. Multilevel Inheritance refers to the concept of Inheritance in a chain. Example - Class B extends Class A, Class C extends Class B. This is permitted in Java. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  inheritance  object oriented programming (oops)  oops concepts   multiple inheritance  object oriented programming (oops)  oops concepts   multi level inheritance  object oriented programming (oops)  oops concepts Basic   frequent | ||||
| ||||
Ans. Web Framework - Spring , Struts, Play Dependency Injection frameworks - Google Guice , PicoContainer and Dagger ORM Framework - Hibernate Big Data / ETL Frameworks - Apche Hadoop , Apache Crunch, Apache Spark. View Frameworks - JSF , Apache Wicket,jtwig. Java Gui Frameworks - SWT , AWT, JavaFX Testing - Junit, Mockito, PowerMock, EasyMock, JMock, JMockit Rest Web services - Jersey , Restlet , RestX, RestEasy ,Restfulie Here is the big list for reference - http://javasearch.buggybread.com/home2.php?keyword= | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  frameworks Asked in 2 Companies intermediate   frequent | ||||
| ||||
Ans. Abstraction, Encapsulation, Polymorphism , Composition and Inheritance | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  core oops concepts Asked in 65 Companies basic   frequent | ||||
| ||||
Ans. Composition and Inheritance are the different types of Associations for Classes. Composition is a has-a association between classes. Inheritance is a is-a association between classes. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  composition  object oriented programming (oops)  oops concepts  inheritance  object oriented programming (oops)  oops concepts  association  relationship between objects | ||||
| ||||
Ans. Generally one reducer runs for all mappers, but it can be increased as per requirements. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  Hadoop  BigData Asked in 1 Companies | ||||
| ||||
Ans. I would avoid that. If we need to initialize member elements differently on the basis of some condition, I would prefer having overloaded constructors. I don't see a need to have a loop for initializing member elements unless the count of elements is huge and they all need to be initialized with common value. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  design constructor  for loop | ||||
| ||||
Ans. Counter controlled repetitions are the loops that are controlled with the use of counters or the loops where the number of repetitions are known in advance. for loop in java is the counter controlled repetition. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  for loop  control statements  loop statement | ||||
| ||||
Ans. runtime polymorphism or method overriding doesn't require method name and signature to be different whereas compile time polymorphism or method overloading requires method name to be same but the signature to be different. | ||||
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  overloading  overriding basic | ||||
| ||||
Ans. dynamic method dispatch is a process in which a call to an overridden method is resolved at runtime rather than at compile-time. This is used to achieve runtime polymorphism in java. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  overriding  runtime polymorphism  object oriented programming (oops)  oops concepts | ||||
| ||||
Ans. TakeScreenshot th = TakeScreenshot(driver); //Enable the driver object to take screenshot File src = th.getScreenShotAs(OutputType.FILE); FileUtils.copyFilesrc("locationWhereUWantToPlaceTheScreenshot.jpg"); | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  webdriver  selenium Asked in 1 Companies | ||||
| ||||
Ans. Dynamic dispatch in java is also known as runtime polymorphism.It is a process in which a call to an overriden method is resolved at runtime. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  dynamic dispatch  runtime polymorphism  object oriented programming (oops)  oops concepts | ||||