Skip to main content

Java Interview questions

Interview questions Java

    1. What is Fail-Fast and Fail Safe Systems?
    2. What is the difference between Encapsulation and Abstraction?
       There are two objects a and b with same hashcode. I am inserting these two objects inside a hashmap.
    3. hMap.put(a,a);
      hMap.put(b,b);
    4. where a.hashCode()==b.hashCode()
    5. Now tell me how many objects will be there inside the hashmap?
    6. What is the difference between StringBuffer and String class ?
    7. What are Marker Interfaces ? Name few Java marker interfaces ?
    8. What are various types of Class loaders used by JVM ?
    9. What are RESTful Web Services ?
    10. What is a cyclic dependency ?
    11. What is reflection ?
    12. How are classes loaded by JVM ?
    13. What is the use of HashCode in objects ?
    14. What is a ConcurrentHashMap ?
    15. How is Hashmap internally implemented in Java ?
    16. What is a Servlet Filter ?
    17. What are the ways to get the values from list ?
    18. There are 8 balls, 7 weigh 100 gms, 1 is defective, there is a weighing scale, any number of balls can be measured at the same time. in how many attempts defective balls can be found out.

    19. serialization and deserialization of singleton class
    20. serialization and deserialization of singleton class
    21. what is volatile and atomic
    22. How many read and write operations are provided at the same time by ConcurrentHashMaps ?

    23. in the following class:
      class A {
      void methoda(Object o) {
      Sysout("Object");
      }
    24. void methoda(String s) {
      Sysout("String");
      }
    25. public static void main(String []args) {
      A a = new A();
      a.methoda(null);
      }
      }
    26. what will be printed?
    27. Explain Hibernate caching mechanism?
    28. Explain the difference between JDK, JRE, and JVM.
    29. What makes Java a platform-independent programming language?
    30. Would it be correct to say that Java is not 100% Object-oriented?
    31. What is a constructor in Java?
    32. Differentiate between a constructor and a method? Can we mark constructors final?
    33. What is a class in Java?
    34. State the significance of public, private, protected class.
    35. What is the final class?
    36. What is a wrapper class?
    37. What is an abstract class?
    38. Describe synchronization with respect to multi-threading.
    39. What is the purpose of garbage collection in Java, and when is it used?
    40. What are the different ways of implementing thread? Which one is more advantageous?
    41. What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?
    42. What is the first argument of the String array in main() method?
    43. What is a Java servlet?
    44. Describe the Life-cycle of a Java Servlet.
    45. Explain the Request Dispatcher?
    46. List the steps to connect to a database in java?
    47. What do you mean by a JDBC Driver?
    48. What is a Java applet?
    49. What is a numeric promotion?
    50. What is false sharing in the context of multi-threading?
    51. What are the methods used to implement for the key Object in HashMap?
    52. What is an immutable object?
    53. Differentiate between String Buffer and String Builder in Java?
    54. What is the difference between factory and abstract factory pattern?
    55. Differentiate JAR and WAR files
    56. What is a JIT compiler?
    57. What is the multi-catch block in Java? 
    58. What is Hashcode
    59. What is callable interface
    60. Where we use Hashcode?
    61. Why Hashcode?
    62. Explain types of design pattern
    63. What is factory design pattern?
    64. What is advantable of java serialization?
    65. What is serial no of serialization why we require it ?
    66. Can a static veriable be serialized?
    67. Can a transient variable be serialiazed?
    68. what is diamond problem
    69. what is spring IOC and types
    70. advantages of applicationcontext over beanfactory
    71. design patterns
    72. what is bean scopes and how global session scope works
    73. what is singleton
    74. lifecycle of a bean
    75. spring security principal
    76. spring cloud
    77. rest vs soap
    78. what  microservices and framework
    79. JAX-RS annotations
    80. spring annottaions
    81. what is ORM and JPA
    82. JPA annoations and how to access the data from table on the basis of columne name and order by using JPA
    83. what is spring authrorization
    84. oauth2.0 working
    85. what is work of dispatcher servlet
    86. what is work of view resolver
    87. how to handle the exception in spring
    88. if there are two @Controller advice in an application, then which one will be called - @Ordered
    89. git commands
    90. apache camel
    91. ways to implement spring security
    92. how to gain concurrency in spring
    93. how to check health of rest service..
    94. what is oops
    95. oops concepts in java
    1. set vs list
    2. set vs map
    3. treeset vs hashset
    4. internal working of set
    5. internal working of map
    6. stream api vs old java nested for loops
    7. polymorphism
    8. design patterns
    9. pizza problem- decorator vs builder pattern
    10. spring conttext
    11. spring scopes
    12. fetch type in hibernate - https://www.mkyong.com/hibernate/hibernate-fetching-strategies-examples/
    13. hashset vs hashtable
    14. spring mvc
    15. what is time complexity improvement in stream api of java
    16. what is generic types
    17. how stream api works and advantages of use
    18. jenkins
    19. maven
    20. hashcode and equals method
    21. program to count the frequency of char in a string
    22. spring cloud
    23. program to find the combination of no whose sum is 10 ()1,2,3,4,5,6,7,8,9)
    24. how the microservices communicate with each others
    25. what is microservices
    26. what is DI and ways to do
    27. when to use constructor based and setter based DI
    28. what is IOC in spring
    29. type of IOC
    30. applicationcontext vs beanfactory
    31. advantages of applicationcontext
    32. difference between lazy and early inalization
    33. IS A and HAS a realationship
    34. aggregation, composition aand association
    35. how index works
    36. What is the return type of compareTo Method ? What is comparable interface?

Comments

Popular posts from this blog

Maximo Interview Questions - Maximo Technical and Functional Questions

Technical Questions How do you rate your self in :- 1. PL/SQL 2. Java 3. Automation Script 4. Mbo Customization 5. Admininstration Jobs 6. Funtional Concepts 7. Maximo Configuration Do not rate anything less than 7 unless you don't want interview to skip the topic Deployment / Administration  1. Explain LDAP integration? 2. Explain SSO and LTPA token? 3. What is global security? 4. How session is managed in Websphere or Maximo? 16. How to insert attributes from Backend? 5. How request is passed in Maximo? 6. How to do horizontal and vertical clustering? 7. Explain how you confire websphere for maximo manually? 8. What are Websphere MQ? 9. What is JMS, Connection Factory and Queues? 10. What is difference between vmm and ldap sync integration ? 11. What is Standalone and federated repository? 12. How to install a new language in Maximo? 13. What are the steps to apply a Fix pack in Maximo, Websphere or DB2? 14. Have you worked on any performance checking tools? 15...

Maximo Bean Class Methods

Methods of Bean Classes of Maximo Reset Method   This method is called when a new filter is applied for the dialog's MboSet.  @see psdi.webclient.system.beans.DataBean#reset()     @Override     public void reset() throws MXException     {             try         {                 saveCurrentSelection();         }         catch (RemoteException e)         {             handleRemoteException(e);         }         super.reset();     } Initialize It is used to initialize values on a d...

Integration Control

Integration control used in making conditions for processing  provides a way to match xml field or object field with particular value. We have 4 types of integration control 1. Value 2.List 3. XRef 4.Boolean Value control is used to compare with single value. List control is used to compare with list of values which may come from domains. Boolean control is true or false value used to compare yorn field I personally never used it. XRef control i.e cross reference control is used to to swap values foe example we have different orgid in other system than we can define cross reference control inorder to translate. We create cross reference control and associate it with enterprise service or publish channel. We can also override these values at external system level.