Interview Questions and Answers - Order By Rating Q811. 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 Q812. 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 Q813. 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 Q814. 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 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  threadsAns. 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 Q817. How does multi threading improve performance ? Core Java
Ans. Every process in it's timeline require different resources. Utilization of resources can be optimized when they are shared among different processes or threads. When one thread is sleeping waiting for a peripheral to complete (e.g. a disk write, or a key press from the keyboard), other threads can continue using processor time and hence would lead to better usage of resources. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  multithreading  threads basic   frequent Q818. Create an event class 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  event class Q819. Which java version supports assertion ? 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   Q820. How will you enable or disable assertion for a package during runtime ? 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   Q821. What sort of challenges do you enjoy ? General
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   Q822. What is your greatest fear ? General
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   Q823. Have you ever been in a situation where any of strength became a weakness in some other setting ? General
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   Q824. 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 Q825. Explain Transitive equals contract. Core Java
Ans. The equals contract is said to be transitive if
obj1.equals(obj2); and obj2(.equals(obj3)
then obj1.equals(obj3) also returns true. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  Transitive equals contract   rare Q826. What is a reflexive equals contract ? Core Java
Ans. An equal contract is said to be reflexive is equality between 2 objects always returns to be true.
For example -
Object o1;
Object o2;
o1.equals(o2); // returns true
o2.equals(o1); //returns true Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  reflexive equals contract Q827. Which java feature is used to convert primitive type to reference type ? Core Java
Ans. AutoBoxing Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Q828. Write code to create a folder if it doesn't exist. Core Java
Ans. File folder = new File(path);
if(!folder.exists()){
try {
folder.mkdir();
} catch (Exception e) {}
} Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  code  coding  file handling basic Q829. Can Java be run on hardware with just the JVM and no OS ? 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   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  aws  amazon web service  Azure Q831. If a high CPU Usage happens everyday at a particular time, How would you go about fixing it ? Server
Ans. We can provision more instances for that particular time slot. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws  amazon web service   server  production support Asked in 1 Companies Q832. Why do we use getbytes in Java? Core Java
Ans. It is used to convert String into an array of bytes.
byte[] getBytes() - converts String into a byte array.
byte[] getBytes(Charset charset) - converts String to byte array, based on charset encoding. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Q833. Have you ever used java.util.Objects class ? Core Java
Ans. Yes, We are using requireNonNull method for validating if the object is null. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  objects  util methods   rare This question was recently asked at 'Bank Of America'.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 Q835. How did you use authentication in node.js ? Node,js
Ans. Using JWT Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  authentication  node.js Asked in 2 Companies Q836. Have you ever worked with encrypted Tokens and How ? Authentication
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   Q837. Between Encrypted Password authentication and IP Authentication , which one would you prefer and why ? Authentication
Ans. IP authentication is very restrictive, if IP changes for some reason then getting the new IP white listed on the server firewall could run your day pretty long. I would prefer encrypted password authentication cause it is not affected by IP changes and not limited to a white listed IP, I could use any different machine and get through authentication without any hassle. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  ip authentication   password authentication   frequent Ans. OAuth is an open-standard authorization protocol or framework that describes how unrelated servers and services can safely allow authenticated access to their assets without actually sharing the initial, related, single logon credential. Like using Google or Facebook to login to something. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 17 Companies Q839. How cookies helps by storing encrypted passwords ? Authentication
Ans. It helps user autofill password on the form where its presented for authentication Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  cookie  authentication Q840. Explain the use of Client certificates for authentication ? Authentication
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  authentication  client certificates