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. |
|
| ||||
Core Java - Interview Questions and Answers for 'Exit' - 4 question(s) found - Order By Newest | ||||
| ||||
Ans. The only time finally won't be called is if you call System.exit() or if the JVM crashes first. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   exceptions   exception handling   try   catch   finally   system   system.exit | ||||
| ||||
Ans. No exit is a method to exit execution of a program. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  exit  keywords  exit a program Asked in 1 Companies | ||||
| ||||
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  Data Stricture   Big O Notation  time complexity | ||||
| ||||
Ans. Create one extra field called MAX O(1) when you an element to the stack check these two condition 1. Stack is empty, then MAX = element 2. Stack is not empty then check if the element is greater than MAX then MAX = element when getMax fuction is called, then return MAX | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  complexity  stack  data structure Asked in 1 Companies | ||||