Interview Questions and Answers for 'Ato' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

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.
Label / Company      Label / Company / Text

   



Interview Questions and Answers - Order By Newest

   
 Q41. Is there a way to know size of an object in Java ?Core Java
Ans. No, Java doesn't have a sizeOf operator. In C / C++ , its required to determine how much memory allocation is required which is not the case with Java. Java handles memory allocation and deallocation intrinsically.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     sizeOf  size of object  sizeOf operator     Asked in 1 Companies        rare


 Q42. What are the cursors available in Java ?Core Java
Ans. Enumeration
Iterator
List iterator

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     cursors  iterator


 Q43. Explain dot(.) operator ?Core Java
Ans. Its used to access the object properties using the object reference or class properties using the Class Name. Moreover its used to access the classes and Interfaces of a package.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     operators


 Q44. What are the different operators in Java ?Core Java
Ans. && - AND
|| - OR
! - LOGICAL NOT

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     operators      Basic


 Q45. What is the difference between && and & in Java ?Core Java
Ans. && is a Logical whereas & is a bitwise operator

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     operators  logical vs bitwise operator


  Q46. What are the core OOPs concepts ?Core Java
Ans. Abstraction, Encapsulation, Polymorphism , Composition and Inheritance

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     core oops concepts     Asked in 65 Companies      basic        frequent


 Q47. Where do you see yourself in next 5 years? General
Ans. Sample Answers -

Getting better with upcoming technologies and be a Lead developer.

In accordance with the company, working as a permenant employee.

Be an associate architect.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 2 Companies


 Q48. What is the precedence of operators in Java ?Core Java
Ans. http://introcs.cs.princeton.edu/java/11precedence/

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     operators  operator precedence      basic


 Q49. What is a mutator in Java?Core Java
Ans. Mutator is another name for setter methods, i.e the method allows for mutating the property of an object and eventually the state of the object.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     setter method  mutator


 Q50. Why do we need Garbage collection ?Core Java
Ans. Garbage collection mechanism frees up the memory that is no longer needed. In languages like C / C++ the deallocation needs to be done explicitly by the programmer and hence any leniency may result in memory leak. Garbage collection in java ensures that all unused memory is reclaimed and hence there are no memory leaks.Moreover it relieves the programmer from the hassle of carefully releasing all memory.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     Garbage Collection  memory management     Asked in 2 Companies


 Q51. Explain OOPS.Core Java
 This question was recently asked at 'Acute Informatics,General Atomics'.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 2 Companies


 Q52. What is the difference between Enumeration and Iterator ?Core Java
Ans. Enumeration can iterate only legacy collections like Vector , HashTable and Stack whereas Iterator can iterate both legacy and non legacy collections.

Enumeration is less safer than Iterator

Enumeration is fail safe whereas Iterator is fail fast

Iterator allows for removal of element while traversal whereas Enumeration doesn't have remove method.

Enumerations were introduced in Java 1 whereas Iterators were introduced with Java 2

Enumerations have methods like hasMoreElements and nextElement whereas Iterators have methods like hasNext, next and remove

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     enumeration vs iterator  collections      Basic        frequent


 Q53. Which of the following is valid greater than and equal to operator in Java ?

>=
=>
Core Java
Ans. >=

=> will result in error.

=> somewhat looks like lambda operator "->"

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     operators  >= operator  greater than and equal to operator  comparison operators


 Q54. What is a ternary operator ?Database
Ans. Ternary operator , also called conditional operator is used to decide which value to assign to a variable based on a Boolean value evaluation. It is used as

condition ? value1 : value2

For example

int y = (x > 0) ? x:0; // assign x if it's greater than 0, else assign 0

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     operator  ternary operator      Basic


 Q55. Why doesn't java support operator overloading ?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     operator overloading


 Q56. How can i split a linked list in two parts in java 8?Core Java
Ans. This can be done using a Spliterator.

LinkedList list = Arrays.asList("names","numbs","birds","animals");
Spliterator split1 = list.Spliterator();
Spliterator split2 = split1.Spliterator();

Now, the LinkedList is split into split1 and split2.
use split2 first then split1 to check the output.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java 8  parallel stream  spliterator     Asked in 1 Companies


  Q57. Explain OOps concepts.Core Java
Ans. There are four main OOP concepts in Java. These are:

Abstraction. Abstraction means using simple things to represent complexity. We all know how to turn the TV on, but we don?t need to know how it works in order to enjoy it. In Java, abstraction means simple things like objects, classes, and variables represent more complex underlying code and data. This is important because it lets avoid repeating the same work multiple times.

Encapsulation. This is the practice of keeping fields within a class private, then providing access to them via public methods. It?s a protective barrier that keeps the data and code safe within the class itself. This way, we can re-use objects like code components or variables without allowing open access to the data system-wide.

Inheritance. This is a special feature of Object Oriented Programming in Java. It lets programmers create new classes that share some of the attributes of existing classes. This lets us build on previous work without reinventing the wheel.

Polymorphism. This Java OOP concept lets programmers use the same word to mean different things in different contexts. One form of polymorphism in Java is method overloading. That?s when different meanings are implied by the code itself. The other form is method overriding. That?s when the different meanings are implied by the values of the supplied variables. See more on this below.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     oops  oops concepts     Asked in 16 Companies      basic        frequent


 Q58. Can we modify a list while iterating it ?Core Java
Ans. No,we cannot.I t will give concurrentModificationExceptin error. It can be resolved by using ConcurrentClasses like ConcurrentHashMap,CopyOnWriteArrayList,BlockingQueue etc which are fail-safe and wont give exception.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     collections  list  iterator     Asked in 1 Companies      basic


 Q59. Design ATM machine application using oops.Design
 This question was recently asked at 'Atos'.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


 Q60. What is garbage collection ?Core Java
Ans. The garbage collection is a facility wherein a program runs on the Java Virtual Machine which gets rid of objects, which are not being used by a Java application anymore. It is a form of automatic memory management and recollection.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 4 Companies


 Q61. What is the access time for ArrayList and LinkedList ?Data Structure
Ans. O(1) for ArrayList
O(n) for LinkedList

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 2 Companies


  Q62. Difference between == and === ?JavaScript
Ans. == compares values === is used in scripting languages for comparing two values as well as there data tpe. like in js,php.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     ==  ===  == vs ===     Asked in 13 Companies      basic        frequent


 Q63. How to sort objects based on one of the field ?Core Java
Ans. Using comparable and comparator and sorted collections like TreeSet or TreeMap.

or

use stream api from java 8 onwards which internally refers to comparable and comparator through lambda expressions

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     sort  sorting  comprator  comparable  treeset  treemap  sorting collections     Asked in 1 Companies      Basic        frequent


 Q64. Where to use interface and abstract class ?Core Java
 This question was recently asked at 'Exterro,Equator Business Solutions'.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 2 Companies


 Q65. What is the name of DNS service provided by AWS ?Amazon Web Services (AWS)
Ans. Route 53

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     AWS DNS  aws Route 53     Asked in 4 Companies


 Q66. Difference between Route53 aliasis and cname ?Amazon Web Services (AWS)
Ans. Cname doesn't support naked domain names whereas aliasis does.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     aws route53     Asked in 3 Companies


 Q67. How to write an iterator for an iterator of iterators?Core Java
Ans. CustomArrayList myarrayList = new CustomArrayList();
      myarrayList.add("Value 1");
      myarrayList.add("Value 2");
      myarrayList.add("Value 3");
      
      for (String string : myarrayList) {
         System.out.println(string);
      }



package sample.utils;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class CustomArrayList implements Iterable {

   private ArrayList mylist = new ArrayList();

   public void add(T t) {
      this.mylist.add(t);
   }

   @Override
   public Iterator iterator() {
      return new CustomIterator(mylist);
   }

   class CustomIterator implements Iterator {

      private int indexPosition = 0;
      private List internalList;

      public CustomIterator(List internalList) {
         this.internalList = internalList;
      }

      @Override
      public boolean hasNext() {
         if (internalList.size() >= indexPosition 1) {
            return true;
         }
         return false;
      }

      @Override
      public E next() {
         E val = internalList.get(indexPosition);
         indexPosition ;
         return val;
      }

   }

}

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     iterator     Asked in 1 Companies


 Q68. How many heaps will be there with 3 threads ?Core Java
Ans. All threads share a common heap.

Each thread has a private stack, which it can quickly add and remove items from. This makes stack based memory fast, but if you use too much stack memory, as occurs in infinite recursion, you will get a stack overflow.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     memory management  heap memory     Asked in 1 Companies


 Q69. What is SNMP ?Networking
Ans. SNMP or Simple Network Management protocol is an application layer protocol for exchanging management information between network devices.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 15 Companies


 Q70. Which of the following is true for == operator ?Core Java
a. For primitives, == checks if the variables on left and right have same data type
b. For primitives, == checks if the variables on left and right have same value
c. For Objects, == checks if the references on left and right have same data type
d. For Objects, == checks if the references on left and right have same value

Ans.b. For primitives, == checks if the variables on left and right have same value

previous 30   

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: