Core Java Interview Questions

Latest 60 Java Interview Questions And Answers Pdf

1. What is the right data type to represent a price in Java?Answer: BigDecimal, if memory is not a concern and Performance, is not critical, otherwise double with predefined precision. 2. What is a class in Java?Answer: Java encapsulates the codes in various classes which define new data types. These new data types are used to create objects. 3. What is a JVM?Answer: JVM is Java Virtual Machine which is a run time environment for the compiled java class files. 4. Explain method overloading?Answer: When a Java program contains more than one methods with the same name but different properties,

Read More »

Best 47 Java Programming Interview Questions And Answers

1. Explain throw keyword in java?Answer: Generally, JVM throws the exception and we handle the exceptions by using try-catch block. But there aresituations where we have to throw user-defined exceptions or runtime exceptions. In such a case, we usethrow keyword to throw an exception explicitly.Syntax: throw throwableInstance;The throwable instance must be of type throwable or any of its subclasses.After the throw statement, execution stops and subsequent statements are not executed. Once exceptionobject is thrown JVM checks is there any catch block to handle the exception. If not then the next catchstatement till it finds the appropriate handler. If the appropriate

Read More »

Java Developer Interview Questions And Answers Pdf

1. Explain the features of interfaces in java? Answer: 1) All the methods defined in interfaces are implicitly abstract even though abstract modifier is not declared. 2) All the methods in an interface are public whether they are declared as public or not. 3) variables declared inside an interface are by default public, static and final. 4) Interfaces cannot be instantiated. 5) we cannot declare static methods inside the interface. 6) ‘ implements’ keyword is used to implement the interface. 7) Unlike class, an interface can extend any number of interfaces. 8) We can define a class inside interface and

Read More »

Top 57 Core Java Programming Interview Questions And Answers

1. How do cookies work in Servlets? Answer: Cookies are text data sent by the server to the client and it gets saved at the client local machine.Servlet API provides cookies support through javax.servlet.https.Cookie class that implements Serializable and Cloneable interfaces.HttpServletRequest get cookies() method is provided to get the array of Cookies from the request, since there is no point of adding Cookie to request, there are no methods to set or add a cookie to request.Similarly, HttpServletResponse addCookie(Cookie c) method is provided to attach cookie in the response header, there are no getter methods for a cookie. 2. What

Read More »

Top 43 Advanced Core Java Interview Questions And Answers

1. Is Swing thread-safe?Answer: No, Swing is not thread-safe. You aren’t able to update Swing components, e.g. JTable, JList or Jpanel from any thread. In fact, they must be updated from a GUI or AWT thread. This is why Swing’s provide In fact, they must be updated from a GUI or AWT thread. This is why Swing’s provide invokeAndWait() and invokeLater() method to request GUI update from alternative threads. These methods put update requests in AWT threads queue and wait for the update or return straight away for an asynchronous update. 2. What are Packages?Answer: A Package can be defined as

Read More »

Core Java Basic Interview Questions And Answers Pdf

1. What are the important features of Java 8 release? Answer: Java 8 has been released in March 2014, so it’s one of the hot topics in java interview questions. If you answer this question clearly, it will show that you like to keep yourself up-to-date with the latest technologies. Java 8 has been one of the biggest releases after Java 5 annotations and generics. Some of the important features of Java 8 are: Interface changes with the default and static methods Functional interfaces and Lambda Expressions Java Stream API for collection classes Java Date Time API I strongly recommend

Read More »

Core Java Videos

Duration: 15-20 Hours
  • Experienced Faculty
  • Real-time Scenarios
  • Free Bundle Access
  • Course Future Updates
  • Sample CV/Resume
  • Interview Q&A
  • Complimentary Materials

self-Paced Courses