Interview Questions and Answers for 'Science' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

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.
Label / Company      Label / Company / Text

   



Interview Questions and Answers for 'Science' - 14 question(s) found - Order By Rating

 Q1. What is abstraction ?Design
Ans. Abstraction is a process of hiding the implementation details and describing only the functionality to the user.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     bstraction  oops concepts  oops principle     Asked in 22 Companies


 Q2. Which environment variables do we need to set in order to run Java programs?Core Java
Ans. PATH, CLASSPATH and JAVA_HOME

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     environment variables  path  classpath  java_home     Asked in 3 Companies      basic        frequent


 Q3. With a Table employee having columns Id,Name,ManagerEmployeeId, Write a SQL to find the Manager with maximum number of employees ?Database
Ans. Select Name from EMPLOYEE where ID in (Select ManagerEmployeeId from EMPLOYEE
Group By ManagerEmployeeId
order by count(Id)
LIMIT 1)

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     database  sql     Asked in 1 Companies


  Q4. What is a self Join and give an example of a self Join ?

or

What is self Join and What is it's purpose ?
Database
Ans. When a Table Join itself , it's a Self Join. For example - we like to know the pair of department names where first dept has lesser employees than the later.

Select D1.name , D2.name from Dept D1, Dept D2 where D1.employee_count < D2.employee_count

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     sql  joins  self join  self-join  Pair of employee names with first having lesser salary than later  Pair of department names where first dept has lesser employees than the later     Asked in 26 Companies      basic        frequent


Frequently asked. Among first few questions in the J2EE segment of interview.
  Q5. What is deployment descriptor ?

or

What is the use of deployment descriptor ?
Java EE
Ans. Deployment Descriptor which is usually web.xml is used to specify the classes, resources and configuration of the application and how the web server uses them to serve web requests.This file is usually added to WEB-INF folder and contains following

* Servlet entries and url mapping
* Plugins
* Some info regarding authentication / filters
* Landing Page
* Event Handlers

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     web.xml   servlets  deployment descriptor     Asked in 15 Companies      basic        frequent

Try 1 Question(s) Test


Very frequently asked. Among first few questions in almost all interviews. Among Top 5 frequently asked questions. Frequently asked in Indian service companies (HCL,TCS,Infosys,Capgemini etc based on multiple feedback ) and Epam Systems
  Q6. Difference between == and .equals() ?Core Java
Ans. "equals" is the method of object class which is supposed to be overridden to check object equality, whereas "==" operator evaluate to see if the object handlers on the left and right are pointing to the same object in memory.

x.equals(y) means the references x and y are holding objects that are equal. x==y means that the references x and y have same object.

Sample code:

String x = new String("str");
String y = new String("str");

System.out.println(x == y); // prints false
System.out.println(x.equals(y)); // prints true

  Sample Code for equals

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   string comparison   string   object class   ==    equals   object equality  operator   == vs equals   equals vs ==     Asked in 294 Companies      basic        frequent

Try 6 Question(s) Test


 Q7. What are transient variables in java?Core Java
Ans. Transient variables are variable that cannot be serialized.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   serialization   transient     Asked in 15 Companies      intermediate        rare


Very Frequently asked to fresh graduates and less experienced. Favorite question in Walk in drives. Frequently asked in Indian Services companies.
  Q8. Difference between Overloading and Overriding ?Core Java
Ans. Overloading - Similar Signature but different definition , like function overloading.

Overriding - Overriding the Definition of base class in the derived class.

  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     java   oops   overloading   overriding   oops concepts   basic interview question   overloading vs overriding     Asked in 86 Companies      basic        frequent

Try 1 Question(s) Test


Frequently asked in Cognizant (CTS)
  Q9. What is Serialization ? Why do we need it ?Core Java
Ans. Storing the state of an object in a file or other medium is called serialization.

Classes can communicate only if they are built together ( as they need Byte code for communication ). What if we need to enable communication between different applications ( i.e they have been built independently or even they reside at different locations ), We need a mechanism that will transfer the Bean state to a Medium than can be transferred to the receiving application.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   oops   serialization     Asked in 18 Companies      basic        frequent

Try 1 Question(s) Test


Very frequently asked in phone and walk in interviews.
  Q10. What are Marker Interfaces ? Name few Java marker interfaces ?Core Java
Ans. An interface without any method declaration is called as marker interface. there are 3 in-built interfaces in JVM i.e. serializable, clonable, remote

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   oops   interfaces   marker interface   serializable   clonable     Asked in 21 Companies      intermediate        frequent

Try 1 Question(s) Test


 Q11. Explain Inner Classes ?Core Java
Ans. The accessibility (public, protected, etc.) of the inner class is defined by the outer class.

Just like top-level classes, an inner class can extend a class or can implement interfaces.

Similarly, an inner class can be extended by other classes, and an inner interface can be implemented or extended by other classes or interfaces.

An inner class can be declared final or abstract.Inner classes can have inner classes, but you will have a hard time reading or understanding such complex nesting of classes.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   oops   classes   inner classes     Asked in 2 Companies      Basic        frequent

Try 2 Question(s) Test


 Q12. Can we call the garbage collector explicitly ?Core Java
Ans. Yes, We can call garbage collector directly but it doesn't guarantees that the gc will start executing immediately. This gc( ) method appears in both Runtime and System classes of java.lang package.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   garbage collection   java memory management   jvm   gc   yes no     Asked in 4 Companies      expert

Try 1 Question(s) Test


Very Frequently asked. Favorite question in walkins and telephonic interviews. Usually among first few questions. Asked in different variants. Must know for intermediate and expert professionals.Among Top 10 frequently asked questions.
  Q13. What is rule regarding overriding equals and hashCode method ?Core Java
Ans. A Class must override the hashCode method if its overriding the equals method.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   collections   hashcode  hash code   equals   collections     Asked in 44 Companies      intermediate        frequent

Try 1 Question(s) Test


 Q14. What is a BlockingQueue?Data Structures
Ans. BlockingQueue is a Queue that supports operations that wait for the queue to become non-empty when retrieving and removing an element, and wait for space to become available in the queue when adding an element.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     blockingqueue   collections   java   concurrent collections     Asked in 10 Companies



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: