Category Archives: Java

Java interview questions and answers

Here is the list of most frequently asked questions in Java Interviews conducted by MNCs like Infosys, TCS, CTS, Cognizant, Wipro, HCL, Persistent and many more.

  1. Can we handle multiple exception in Java?
  2. Types in multi-catch must be disjoint. IOException and JsoMappingException 
  3. How to convert from int to String? – Integer.toString(989)
  4. View contents of Jar
  5. How to add dependency in Gradle project?
  6. Gradle project folder – > src -> main (java and resources)
  7. Gradle project folder – > src -> test (java and resources)
  8. Significance of build (contains third party library files) and etc contains POM files
  9. Build.gradle file is in the root of the project
  10. What is .gradle and .idea files in gradle project?
  11. what is rebase, stash, unstash, shelve changes in GIT
  12. What is fiddler and how to use in Java web application development?
  13. How to read environment variable
  14. How to format numbers
  15. Boxing and unboxing
  16. Converting from int to, float to double etc
  17. Multi-Threading in Java
  18. What is Reflections in Java? Any examples
  19. What are various Java design patterns?
  20. What are popular Java Libraries? Mustache, Jackson, Jsoup, Joda
  21. What is Properties in Java Project?
  22. accessing a file using X.class.getClassLoader().getResourceAsStream(fileName);
  23. Explain SOAP and Rest  examples in Java
  24. JSON, YAML, XML handling in Java
  25. Difference between StringBuffer and StringBuilder methods
  26. What is difference between Runtime.exec and ProcessBuilder?
  27. What is the difference between AWT, swing and JAVAFX
  28. How to use JDBC?
  29. What is Hibernation and Serialization?
  30. Difference between final, finally and finalize?
  31. Difference between throw, throws, thrown?