Interview Questions and Answers - Order By Newest Q2371. Given a max-heap represented as an array, Return the n th largest element without modifying the heap. 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   Q2372. Write code to serialize and deserialize an array of strings ? 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   Q2374. Find the length of the non repeated numbers in an array. 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   Q2375. Can we have 3 dimensional arrays in Java ? Core Java
Ans. Yes Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  arrays Q2376. Can we make array volatile in Java ? Core Java
Ans. Yes, you can make an array (both primitive and reference type array e.g. an int array and String array) volatile in Java but only changes to reference pointing to an array will be visible to all threads, not the whole array Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  arrays  volatile Q2377. Write a program to insert a value after a specific value in an array. 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   Q2378. How do you implement 'state and behavior' of object in Java program? 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   Q2379. How is it possible to use concat on string objects in Java, based on the fact that string is immutable? Core Java
Ans. It's possible because internally java first reserves the memory for the new concatenated string and then copy that over. So after concatenation, there are 2 strings in memory, the original one and the concatenated one and then the reference is moved to the concatenated string. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Q2380. Difference between static and dynamic memory allocation ? 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   Q2381. Why Arrays are considered as data structures whereas ArrayList isn't ? 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   Q2382. Are Arrays a data structure or a collection class ? 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   Q2383. Which Java version supports Interface Default methods ? Core Java
Ans. Java 1.8 or Java 8 Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  default methods   interface default methods   java 8  java 8 features Q2384. Tell something about Sleep method. Core Java
This question was recently asked at 'IBM'.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  Thread  sleep  multithreading Asked in 1 Companies Basic Q2385. What is the use of sql dialect ? Hibernate
Ans. Dialect means "the variant of a language".
Similarly in case of SQL Dialect we specify what dialect of SQL to be generated keeping in mind of underlying database. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql dialect  hibernate   hibernate Asked in 2 Companies Q2386. Which jar files need to be included for using Hibernate ? Hibernate
Ans. hibernate-orm
hibernate-validator
hibernate-ogm
hibernate-search
or you can download hibernate core with all dependencies. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  hibernate jar files   hibernate Asked in 1 Companies Q2387. Diff between Runtime.getRunTime().gc() and System.gc() Core Java
This question was recently asked at 'CIGNEX Datamatics'.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 Q2388. How to run jar file using command prompt Core Java
This question was recently asked at 'CIGNEX Datamatics'.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  jar  running jar using command line  cron entry   setting java app as cron Asked in 1 Companies Q2389. Can we call a static method using reference currently pointing to null. Core Java
Ans. yes, we can.
exa: public class Java{
public static void main(String... args) {
JAva j= null;
j.greeting(); // call with null reference
}
public static void greeting() {
System.out.println("Hello World");
}
} // output: Hello World Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  static methods   static Asked in 1 Companies Q2390. Which memory segment holds the byte code ? Core Java
Ans. Code Segment Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  Memory Management  Code Memory Segment  Code Segment Memory  Code Segment 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 Migration Basic Q2392. Have you worked with Data Feeds ? 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  Datafeed Q2393. Do you know how can we export Redis data ? Redis
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  Amazon Web Services (AWS)  Redis  Memcache Q2394. What is your daily work schedule ? General
This question was recently asked at 'IBM'.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   frequent Q2395. Have you heard of volatile Table in Teradata ? Teradata
Ans. If you create table with VOLATILE option, the life of the table will be only for the current session.
It will be automatically dropped by Teradata manager once session expires. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  teradata  database  volatile table Q2396. Is this array declaration correct ? If not , Why ?
String[] strArray = new String[]; Core Java
Ans. No, We haven't specified the size of array to be initialized. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  arrays  array initialization Q2397. Is this array initialization correct ? If Yes, What will be the size of array ?
String[] strArray = new String[]{"Buggy","Bread"}; Core Java
Ans. Yes, size of the array will be 2. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  arrays  array initialization Q2398. Is this array initialization correct ? If Yes, What will be the size of array ?
String[] strArray = new String[3]{"Buggy","Bread"}; Core Java
Ans. No. It will result in error saying "Cannot define dimension expressions when an array initializer is provided" Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  arrays  array initialization Q2399. Is this code valid
String[] strArray = new String[2];
strArray.length = 5; Core Java
Ans. It will give compile time error saying "The final field array.length cannot be assigned"
Arrays once initialized cannot be resized. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  arrays  array initialization Q2400. What is the problem with this code
String[] strArray = new String[2];
strArray[0] = 5; Core Java
Ans. We are trying to add an integer element to an array of String. Will give compile time error. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  arrays