Interview Questions and Answers - Order By Newest 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 schedulerAns. 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 Q2343. What are the different ways to avoid multi Threading related problems in Java ? Core Java
Ans. Synchronization,
Concurrent classes,
Volatile keyword,
Implementing concurrent Lock interface,
Immutable classes Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  multithreading  threads  ways to avoid thread related problems  synchronization  volatile  concurrent collections Intermediate Q2344. What is context switching wrt Threads in Java? Core Java
Ans. Context Switching is the process of storing and restoring of CPU state so that Thread execution can be resumed from the same point at a later point of time. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  Threads  multithreading  context switching Q2345. What is an Atomic Operation ? General
Ans. Atomic operations are performed in a single unit of task without interference from other operations. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q2346. What is Lock interface in Java Concurrency API ? Core Java
Ans. Lock interface provide more extensive locking. They allow more flexible structuring and may support multiple associated Condition objects. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  concurrency api Q2347. Why Concurrent Collection Classes are fail-fast in Java ? Core Java
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  concurrent collection classes   fail fast   fail-fast  collections  collection classes expert Q2348. Can a class extend itself in Java ? Core Java
Ans. No 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 Q2349. What is method hiding in Java ? Core Java
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  method hiding Q2350. Can you prevent overriding a method without using final modifier or without declaring it private ? Core Java
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   Q2351. Can we override a non-static method as static in Java ? Core Java
Ans. No, there is no method overriding with static methods. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Q2352. Can we declare constructor inside an interface ? Why ? Core Java
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  interface   constructor Q2353. Can we declare an Interface with abstract keyword ? Core Java
Ans. Yes Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  abstract keyword Q2354. Does Java generate .class file for interfaces ? Core Java
Ans. Yes Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  .class file  java byte code  interfaces 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  arrays Q2356. Can we change the size of array once created ? Core Java
Ans. No. Arrays cannot resize dynamically. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  array  array size Basic Q2357. Can we use generics with arrays in Java ? Core Java
Ans. No Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Q2358. What is the difference between ArrayIndexOutOfBoundException and ArrayStoreException? Core Java
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  exception handling Q2359. What is ArrayStoreException ? Core Java
Ans. It's an exception that is thrown when we attempt to add value of an incompatible type to an array.
For example -
Object[] strArray = new String[2];
strArray[0] = 5;
In this code, strArray reference of type Object has currently been assigned the String array but at line 2 we are trying to add an integer value. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  arrays   ArrayStoreException Q2360. What is an anonymous array in Java ? Core Java
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  anonymous arrays Q2361. Can you write code to copy one array into another ? Data Structure
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  Ans. an array of different sizes Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  arrays  jagged arrays Q2363. Where are arrays stored in memory - stack or heap ? Core Java
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   Q2364. Are Arrays treated like primitives or like objects in Java ? Core Java
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  arrays Q2365. How can we check equality for Arrays in Java ? Core Java
Ans. You call the method java.util.Arrays.equals(Object[] a, Object[] a2)? Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  arraysAns. Yes Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  arrays  concurrency Asked in 1 Companies Q2367. What is the time and space complexity for different operations for arrays ? Core Java
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  arrays 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  arrays vs linkedlist Q2369. What is the ideal situation / case for using heap sort ? Algorithm
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   Q2370. In an array every element is repeated twice except one, Find that element? Data Structure
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