Interview Questions and Answers - Order By Rating        Q901. 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  Q902. 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   Q903. What is the difference between log4j and java logging api.  Log4j 
Ans. log4j is by apache while java logging api is given by sun. log4j is more powerful,extensible and simple to use than java logging api.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve              Asked in 1 Companies   Q904. 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  Q905. 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  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   Q907. 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  Q908. What is meant by "unreachable code" ? Can you write a code segment explaining this ?  Core Java 
Ans. Unreachable code is a code segment that can never be executed in any case. For example - 
 
int x = 5; 
return; 
System.out.println(x); 
 
In this code , 2nd line will return the control out of the method and hence 3rd line will never get executed and hence is unreachable code. This will be caught at compile time only.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        unreachable code  Q909. 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   Q910. 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   Q911. 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   Q912. 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   Q913. 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   Q914. 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   Q915. 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  Q916. How can multi threading lead to a deadlock ?  
  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          Q917. 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          Q918. 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          Q919. 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          Q920. 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          Q921. 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          Q922. 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          Q923. 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  Q924. 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  Q925. Can we declare an array without assigning the size of an array?   Core Java 
Ans. No, It will throw compile time error saying "must provide either dimension expressions or an array initializer" 
 
Alternatively we can provide array initializer like  
 
String[] strArray = new String[]{"Buggy","Bread"}; 
 
which will initialize it to size 2 with values as "Buggy" and "Bread" 
   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        arrays  array initialization  Q926. 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          Q927. Given an array, find the minimum inverting factor.  Design 
  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          Q929. 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          Q930. 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