Pages

Java Interview Questions




Java Interview Questions

Hello friends once again we discuss some memory based Java Interview Questions, These questions are submitted by one of my friend. I hope these are helpful for you. 

Java Interview Questions

  1. Why use AWT in Java ?
  2. What is event Handling in Java ?
  3. Explain button event handling in AWT ?
  4. What is the difference between Swing and AWT components?
  5. What's the difference between constructors and other methods?
  6. Is there any limitation of using Inheritance?
  7. When is the ArrayStoreException thrown?
  8. Can you call one constructor from another if a class has multiple constructors?
  9. What's the difference between the methods sleep() and wait()?
  10. When ArithmeticException is thrown?
  11. What is a transient variable?
  12. What is synchronization?
  13. What is the Collections API?
  14. What is Collection framework ?
  15. Does garbage collection guarantee that a program will not run out of memory?
  16. The immediate superclass of the Applet class?
  17. Which Java operator is right associative?
  18. What is the difference between a break statement and a continue statement?
  19. If a variable is declared as private, where may the variable be accessed?
  20. What is the purpose of the System class?
  21. List primitive Java types ?
  22. Explain data type in java ?
  23. What is the relationship between clipping and repainting under AWT?
  24. Which class is the immediate superclass of the Container class?
  25. What class of exceptions are generated by the Java run-time system?
  26. Under what conditions is an object's finalize() method invoked by the garbage collector?
  27. How can a dead thread be restarted?
  28. Which arithmetic operations can result in the throwing of an ArithmeticException?
  29. Variable of the boolean type is automatically initialized as?
  30. Can try statements be nested?
  31. What are ClassLoaders?
  32. Purpose of ClassLoader ?
  33. What is the difference between an Interface and an Abstract class?
  34. What will happen if static modifier is removed from the signature of the main method?
  35. What is the default value of an object reference declared as an instance variable?
  36. Can a top level class be private or protected?
  37. Why do we need wrapper classes?
  38. What is the difference between error and an exception?
  39. Is it necessary that each try block must be followed by a catch block?
  40. When a thread is created and started, what is its initial state?
  41. What is the Locale class?
  42. What are synchronized methods and synchronized statements?
  43. What is runtime polymorphism or dynamic method dispatch?
  44. What is Dynamic Binding(late binding)?
  45. Can constructor be inherited?
  46. Can we make constructor final ?
  47. What are the advantages of ArrayList over arrays?
  48. Difference between Array and Collections ?
  49. Difference between Stack and Queue ?
  50. Difference between Queue and LinkedList ?




1 comment

  1. Hey
    There,

    Thank you! Thank you! Thank you! Your blog was a total game changer!

    I am going to
    implement the blackbox class ""messagePool"". Details are as below. I
    just want to implement it so that the whole application can run.

    // Call messagePool

    Java Code:

    Dac dac =
    GenericDac.getInstance();


    String result =
    dac.getMessagePool().getMessage(languageCode, key);

    public abstract interface Dac extends java.io.Serializable{


    public abstract void init(javax.servlet.ServletContext
    arg0, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3,
    java.lang.String arg4) throws com.jos.adf3.core.exception.DacInitException;


    public abstract com.pool.MessagePool getMessagePool();


    }


    public class GenericDac implements Dac{


    private com.pool.MessagePool messagePool;


    }



    Super likes !!! for this
    amazing post. I thinks
    everyone should bookmark this.

    Regards,
    Morgan

    ReplyDelete

 

Most Reading