Interview Questions and Answers - Order By Newest Q811. .Can you uninstall an older version of Merge before installing a newer version or build?
Ans. NA Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  technologies   merge Q812. What things you will look for if you get following exception while making DB call ? table or view does not exist Database
Ans. First will check if the table or view actually exist in the DB If it does , Will make sure to see that the application has rights on the schema that holds the respective Table. Will then make sure that we have prefixed the schema with the table name while accessing it. Will then make sure that its not DB Cache that's causing it as the table DDL might have been created recently. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql   database   oracle   technical lead Q813. What's the benefit for specifying constraints like Not Null , Primary Key explicitly instead of specifying it against the column ? Database
Ans. In case we specify them explicitly we can have control over constraint name as otherwise they will be system generated. It provides an ease in case we plan to drop the constraint in future. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql   database   oracle Q814. How can we disable a constraint ? Database
Ans. alter table table_name DISABLE constraint constraint_name; Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql   database   oracle Q815. Can we have foreign key reference to a non primary key column ? Database
Ans. Yes, but the respective key in the foreign table should be declared Unique. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql   database   oracle Asked in 2 Companies Q816. What should be done for auto generating primary key id in a table ? Database
Ans. We need to create a sequence. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql   database   oracle Q817. Which constraint cannot be specified as an explicit constraint and should be specified with the column only ? Database
Ans. NOT NULL Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql   oracle   database   ddl   constraint   table creation Q818. How can we see Dependencies for the project and where exactly they are defined ? Maven
Ans. Using mvn dependency:tree Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  maven   maven repository   maven dependencies   dependency tree Q819. What are the benefits of transitive depency in Maven ? Maven
Ans. Transitive dependencies allows to avoid specifying the libraries that are required by the project which are specified in other dependent projects - Remote or Local. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  maven   maven repository   dependencies   transitive dependencies   build management Q820. Will this code compile ? public class BuggyBread1{ abstract public void test(); } Core Java
Ans. No. It will give the compilation error saying "The abstract method test in type BuggyBread1 can only be defined by an abstract class". We need to declare the class abstract for it to have any abstract method. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   oops   abstract class   abstract methods   java compilation error Q821. Will this Code compile ? abstract public class BuggyBread1{ abstract public void test(){}; } Core Java
Ans. No. This will give a compilation error saying "Abstract methods do not specify a body". Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   abstract classes   abstract methods   java compilation error   java coding   java code   coding   yes-no Q822. Give an Example for Builder Pattern ? Core Java
Ans. String str = new StringBuilder().append("Buggy").append("Bread").toString(); Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   builder pattern   design pattern   stringbuilder   string Asked in 3 Companies Try 1 Question(s) Test Q823. Is this Polymorphism ?
Map<String, List<String>> inventoryManagerCountMap = new HashMap<String, ArrayList<String>>(); Core Java
Ans. No. This will result in compilation error as Polymorphism cannot be performed on Object types. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   polymorphism  object oriented programming (oops)  oops concepts Q824. How to know the structure of a Table in Oracle ? Database
Ans. DESC Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql   database   oracle Q825. How to know the constraints on a Table in Oracle ? Database
Ans. SELECT * FROM user_constraints WHERE table_name = '' Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql   database   oracle Q826. How to know the default column value of a Table in Oracle ? Database
Ans. Select DATA_DEFAULT from DBA_TAB_COLUMNS where TABLE_NAME = '' and COLUMN_NAME=''; Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql   database   oracleRarely asked as it was introduced with Java 8. Q827. Difference between DoubleSummaryStatistics , IntSummaryStatistics and LongSummaryStatistics ? Core Java
Ans. They all does the same task i.e to compute statistical information on the stream of data. They differ by the way they store the statistical information as they expect a different data type of the values being used. IntSummaryStatistics and LongSummaryStatistics expect non floating point values and hence stores the statistical information like min,max and sum as non floating values ( int or long ) whereas DoubleSummaryStatistics stores these information as floating value. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   java8   java 8   lambda expressions   doublesummarystatistics   intsummarystatistics   longsummarystatistics   summarystatistics Q828. Have you ever used StringTokenizer ? Core Java
Ans. No, Alternatively I have used String.split("\\s") for achieving the same function. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   string   stringtokenizer Q829. What is ConcurrentLinkedDeque ? Core Java
Ans. It's a Collections concrete class that provides implementation of a Double Ended queue that allows concurrent insertion, removal, and access operations that can be executed safely across multiple threads. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   collections   queue   deque   concurrent collections Q830. What is CopyOnWriteArrayList ?
Ans. Its a type of ArrayList in which all Write operations , i.e add and set are performed by creating a new copy. This array never changes during the lifetime of the iterator, so it never throws ConcurrentModificationException Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   collections   list   arraylist   copyonwritearraylist   ConcurrentModificationException Asked in 1 Companies Q831. What are the advantages and disadvantages of CopyOnWriteArrayList ? Core Java
Ans. This collections class has been implemented in such a manner that it can never throw ConcurrentModificationException. As it performs update and write operations by creating a new copy of ArrayList, It's slower compared to ArrayList. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   collections   list   arraylist   copyonwritearraylist   advantages-disadvantages   ConcurrentModificationException Asked in 4 Companies Expert Q832. Name few Concurrent Collection Classes ?
Ans. ConcurrentHashMap ConcurrentLinkedDeque ConcurrentLinkedQueue ConcurrentMap ConcurrentNavigableMap ConcurrentSkipListMap ConcurrentSkipListSet Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   collections   concurrent collections Q833. Name few Collections Map implementations ?
Ans. AbstractMap ConcurrentHashMap ConcurrentSkipListMap EnumMap HashMap IdentityHashMap LinkedHashMap SystemFlavorMap TreeMap WeakHashMap Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   collections   map Q834. What is ArrayIndexOutOfBoundException ? Core Java
Ans. Exception thrown by the application is we try to access an element using an index which is not within the range of array i.e lower than 0 or greater than the size of the array. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   exceptions   arrayindexoutofboundexception Asked in 1 Companies Q835. What is Criteria in Hibernate ? Hibernate
Ans. Criteria is a simplified API for retrieving entities by composing Criterion objects.
For example - session.createCriteria(Employee.class).add( Restrictions.like("name", "A%") ).list();
will return all employee objects having name starting with A. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  hibernate   hibernate criteria Asked in 7 Companies Basic   Frequent Try 1 Question(s) Test Q836. How do we specify the criteria if it involves mapping between two entities or join between tables ? Hibernate
Ans. The following code returns the list of Employee objects having employee name starting with A and Dept Name ( Department , Employee Mapped ).
session.createCriteria(Employee.class,"emp")
.createAlias("emp.department", "dept",Criteria.INNER_JOIN)
.add( Restrictions.like("name", "A%") )
.add(Restrictions.eq("dept.name","Finance")
.list(); Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  hibernate   hibernate criteria   hibernate table mapping Q837. Name few Restriction Methods ? Hibernate
Ans. eq, ge, gt , between, in , isNull, isEmpty, isNotnull, ne , like, lt , or , not Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  hibernate   hibernate criteria   hibernate restriction Q838. In Hibernate, While defining Criteria, Have you ever faced any problem while adding restrictions with user defined types or Enums ? Hibernate
Ans. Yes, with Enum as was getting an exception while doing equality check for enum field. got it fixed by adding @Enumerated(EnumType.STRING) to the field in entity. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  hibernate   hibernate criteria   enumerations Q839. What is your choice while writing queries within Hibernate - criteria or HQL ? Hibernate
Ans. I prefer using Criteria for Dynamic queries and HQL for static queries. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  hibernate   hibernate criteria   hql Q840. Can we initialize member variables within static block ?
Ans. Static block is like static method that gets executed upon class loading. The way static method allows accessing member variables ( using object references only ), the same static block can also access and initialize member variables. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   static block