Interview Questions and Answers for 'System' | 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 - Order By Newest

   
 Q101. What is Priority inversion ?Operating System
Ans. Priority inversion is a problematic scenario in scheduling in which a high priority task is indirectly preempted by a lower priority task effectively inverting the relative priorities of the two tasks.

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

   Like         Discuss         Correct / Improve          Asked in 5 Companies


 Q102. What is JVM ?Core Java
Ans. JVM (Java Virtual Machine) is an abstract machine. It is a specification that provides runtime environment in which java bytecode can be executed.JVMs are available for many hardware and software platforms (i.e. JVM is platform dependent).Runtime Instance Whenever you write java command on the command prompt to run the java class, an instance of JVM is createdThe JVM performs following operation:Loads codeVerifies codeExecutes codeProvides runtime environment

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

   Like         Discuss         Correct / Improve     memory management  jvm     Asked in 3 Companies      basic        frequent


 Q103. Write a class and override the equals and hashcode method ?Core Java
Ans. class Student
{
///
///
///
private int id;
private String name;

///
///
///
public Student(int id, String name)
{
this.name = name;
this.id = id;

}// Student

///
///
///
public int getId()
{
return id;

}// getId

///
///
///
public void setId(int id)
{
this.id = id;

}// setId

///
///
///
public String getName()
{
return name;

}// getName

///
///
///
public void setName(String name)
{
this.name = name;

}// setName

@Override
public boolean equals(Object obj)
{
if (obj == null) return false;
if (!(obj instanceof Student))
return false;
if (obj == this)
return true;

return this.getId() == ((Student) obj).getId();

}// equals

///
///
///
@Override
public int hashCode()
{
return this.getId();

}// hashCode

}// Student

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

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q104. What are the four situations that are required for deadlock to happen ?Operating System
Ans. mutual exclusion i.e the resource is not shareable and hence a process should have exclusive access to it at a particular time

Hold and Wait i.e the process doesn't release all existing resources held by it before requesting for another one.

No preemption i.e noone can forcefully release a resource held by another process and the process should voluntarily release the resource held by it.

Circular Wait - For ex, P1 is waiting on resource to be released by P2, P2 is waiting on resource to be released by P3 and P3 is waiting on the resource to be released by P1

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

   Like         Discuss         Correct / Improve     deadlock  process


 Q105. What is Livelock in relation to deadlock ?Operating System
Ans. Livelock is when two threads or processes get deadlocked because they try to perform the same action to come out of a potential deadlock.

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

   Like         Discuss         Correct / Improve     livelock  deadlock]


 Q106. What is the difference between CountingSemaphore and a CountDownLatch?Operating System
 This question is still unanswered. Can you please provide an answer.


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

   Like         Discuss         Correct / Improve     CountingSemaphore  CountDownLatch


 Q107. What is a host file ?Operating System
Ans. It's an operating system file that maps IP address to host names. The hosts file assists the OS in addressing networked components and serves the function of translating human friendly hostnames into numeric protocol addresses, called IP addresses, that identify and locate a host in an IP network.

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

   Like         Discuss         Correct / Improve     host file  operating system     Asked in 1 Companies


 Q108. What are the examples of immutable objects in Java ?Core Java
Ans. Following Classes in Java SE creates immutable objects

String class
Wrapper Classes like Integer, Float etc.
StackTraceElement
Most Enum classes
File Class
Locale Class

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

   Like         Discuss         Correct / Improve     immutable  immutability objects  immutable  immutability     Asked in 1 Companies      Basic        frequent


 Q109. Can you give real time examples of thread or where thread are actually used ?Core Java
Ans. Games are very good examples of threading.You can use multiple objects in games like cars, motor bikes, animals, people etc. All these objects are nothing but just threads that run your game application.

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

   Like         Discuss         Correct / Improve     threads  multithreading     Asked in 1 Companies


Very frequently asked. Usually among very first few questions.
 Q110. Define encapsulation in Java ?Core Java
Ans. Encapsulation is a feature of OOP's that binds the data and it's associated methods together as a single unit and facilitate protection and data hiding by providing minimal interface to outside. For example - member variables are declared private and are accessed through public methods. Moreover we have private methods that can only be used internally and hence providing minimal interface to outside class through use of public methods.

  Sample Code for encapsulation

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

   Like         Discuss         Correct / Improve     encapsulation  object oriented programming (oops)  oops concepts  oops  oops concepts  oops features     Asked in 4 Companies      Basic        frequent


 Q111. Solve the producer and consumer problemOperating System
 This question was recently asked at 'Dell'.This question is still unanswered. Can you please provide an answer.


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

   Like         Discuss         Correct / Improve     producer consumer problem  multi-process synchronization problem     Asked in 1 Companies


  Q112. Explain OOps concepts.Core Java
Ans. There are four main OOP concepts in Java. These are:

Abstraction. Abstraction means using simple things to represent complexity. We all know how to turn the TV on, but we don?t need to know how it works in order to enjoy it. In Java, abstraction means simple things like objects, classes, and variables represent more complex underlying code and data. This is important because it lets avoid repeating the same work multiple times.

Encapsulation. This is the practice of keeping fields within a class private, then providing access to them via public methods. It?s a protective barrier that keeps the data and code safe within the class itself. This way, we can re-use objects like code components or variables without allowing open access to the data system-wide.

Inheritance. This is a special feature of Object Oriented Programming in Java. It lets programmers create new classes that share some of the attributes of existing classes. This lets us build on previous work without reinventing the wheel.

Polymorphism. This Java OOP concept lets programmers use the same word to mean different things in different contexts. One form of polymorphism in Java is method overloading. That?s when different meanings are implied by the code itself. The other form is method overriding. That?s when the different meanings are implied by the values of the supplied variables. See more on this below.

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

   Like         Discuss         Correct / Improve     oops  oops concepts     Asked in 16 Companies      basic        frequent


 Q113. How to Create Cron Job in Hybris e-commerce suiteHybris
 This question was recently asked at 'Patni Computer Systems,IGate'.This question is still unanswered. Can you please provide an answer.


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

   Like         Discuss         Correct / Improve          Asked in 2 Companies


 Q114. Why do you want to leave your current job ?General
Ans. The most effective and acceptable reasons for leaving your current job should be positive e.g. moving forward in your life or career

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

   Like         Discuss         Correct / Improve          Asked in 21 Companies


 Q115. What methodology and technology stack do you use ?General
Ans. [Open Ended Answer]

Possible Answer - We are using Agile. We have daily standups, Bi weekly Backlog Grooming , Planning and Retrospective, We have a 2 week sprint and We use Jira for Scrum Management. We are using Java 8, Spring Boot, JSF , Apache Kafka , Soap as well as Rest Services.

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

   Like         Discuss         Correct / Improve          Asked in 9 Companies


 Q116. What is optimistic and pessimistic locking ?Operating System
 This question is still unanswered. Can you please provide an answer.


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

   Like         Discuss         Correct / Improve     


 Q117. Difference between sleep() and Wait()Operating System
 This question was recently asked at 'PegaSystems'.This question is still unanswered. Can you please provide an answer.


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

   Like         Discuss         Correct / Improve          Asked in 1 Companies


  Q118. Write code to sort an array.Algorithm
Ans. https://www.geeksforgeeks.org/arrays-sort-in-java-with-examples/

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

   Like         Discuss         Correct / Improve     array  sorting     Asked in 16 Companies      basic        frequent


 Q119. What is OSGI ?OSGI
Ans. OSGI is open service gateway initiative, its used as java framework for developing and deploying the modular softwares.

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

   Like         Discuss         Correct / Improve          Asked in 23 Companies


 Q120. What sets you apart from other developers ?

or

What are the distinguished qualities you have ?
General
Ans. https://blog.timesunion.com/careers/the-10-most-important-personality-traits-for-career-success/633/

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

   Like         Discuss         Correct / Improve          Asked in 32 Companies


 Q121. What is Time slicing with respect to Threads ?Operating System
Ans. Time Slicing is the process to divide the available CPU time to the available runnable threads.

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

   Like         Discuss         Correct / Improve     Time Slicing  threads  thread scheduling   thread scheduler


 Q122. What is Thread scheduler ?Operating System
Ans. Thread Scheduler is the Operating System service that allocates the CPU time to the available runnable threads.

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

   Like         Discuss         Correct / Improve     Thread scheduler  threads


 Q123. Explain Hibernate caching mechanismHibernate
Ans. Every fresh session having its own cache memory, Caching is a mechanism for storing the loaded objects into cache memory. The advantage of cache mechanism is, whenever again we want to load the same object from the database then instead of hitting the database once again, it loads from the local cache memory only, so that the no. of round trips between an application and a database server got decreased. It means caching mechanism increases the performance of the application.

In hibernate we have two levels of caching

First Level Cache [ or ] Session Cache
Second Level Cache [ or ] Session Factory Cache [ or ] JVM Level Cache

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

   Like         Discuss         Correct / Improve          Asked in 23 Companies


 Q124. Pascal Triangle Program
Ans. package snippet;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Pascal {
   public static void main(String[] args) {

      System.out.println(generatePascalTriangle(5));

   }

   static Map> generatePascalTriangle(int size) {
      Map> triangle = new HashMap<>();

      triangle.put(0, Arrays.asList(1));
      triangle.put(1, Arrays.asList(1, 1));

      for (int i = 2; i <= size; i ) {
         List coeffListForI = new ArrayList<>();
         List coeffListForI_1 = triangle.get(i - 1);
         coeffListForI.add(1);
         for (int j = 0; j <= coeffListForI_1.size() - 2; j ) {
            coeffListForI.add(coeffListForI_1.get(j) coeffListForI_1.get(j 1));
         }
         coeffListForI.add(1);
         triangle.put(i, coeffListForI);
      }

      return triangle;
   }
}

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

   Like         Discuss         Correct / Improve          Asked in 8 Companies


 Q125. Write a calculator and find if a character appears more than n times ?Design
 This question was recently asked at 'Mercury Systems'.This question is still unanswered. Can you please provide an answer.


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

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q126. Difference between System.getEnv and System.getProperties ?Core Java
Ans. System.getEnv gets the environment variables where System.getProperties gets Java properties.

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

   Like         Discuss         Correct / Improve     System.getEnv  System.getProperties  environment variables


 Q127. what are system callsOperating System
 This question was recently asked at 'Informatica'.This question is still unanswered. Can you please provide an answer.


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

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q128. What is out in System.out.println ?Core Java
a. out is static inner class
b. out is the reference for static inner class object
c. out is the static reference to OutputStream object
d. out is the static reference to PrintStream object

Ans.d. out is the static reference to PrintStream object

 Q129. Semaphores are used to solve problem of ... Operating system
a. Race Condition
b. Process Synchronization
c. Mutual Exclusion
d. All of above

Ans.d. All of above

previous 30   

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: