Java Questions – I

For Answers – Click Here – http://moroma.com/blog/tech-notes/pathway-for-a-budding-programmer/java-question-i-answers

  1. What is JDK? – Done
  2. What is javac? – Done
  3. What is JRE? – Done
  4. What is JVM?- Done
  5. What does a .java file contain?- Done
  6. What does a .class file contain?- Done
  7. Why is java considered platform independent?- Done
  8. What is difference between a primitive and non-primitive data type?- Done
  9. Give a short example code snippet for each of the two conditional statements in Java? – Done
  10. Give a short example code snippet for two loop statements in Java? – Done
  11. What are the components of a method “signature”? – Done
  12. What is OOP? – Done
  13. List at least 4 differences between OOP and Procedural Programming? – Done
  14. What are the 4 pillars or 4 main components of OOP? – Done
  15. How would you define an object? – Done
  16. What are the two components of an object? -Done
  17. How would you define a class? – Done
  18. What is the relationship between a class and an object? – Done
  19. What are object attributes & properties?- Done
  20. What are object methods & behaviors?- Done
  21. What is the difference between a class attribute and an object (or instance) attribute?- Done
  22. How would you create an instance an object “o1″ from a class “CCC”?- Done
  23. What is the significance of a class constructor?- Done
  24. What is the significance of a class destructor?- Done
  25. What do you mean by Inheritance? – Done
  26. How would you inherit a child class C1 from a parent class P1? – Done;
  27. What do you mean by Polymorphism? – Done
  28. What is the difference between overriding and overloading of methods? – Done
  29. What is the difference between static polymorphism and compile time polymorphism? – Done
  30. What do you mean by Encapsulation? – Done
  31. What is the difference between private scope attribute and public scope attribute? – Done
  32. Why would you create a protected scope attribute? – Done
  33. What do you mean by Abstraction? -Done
  34. In Java, what is the difference between the String and StringBuffer class? – Done
  35. What is the scope of a local variable vs an instance variable? -Done
  36. What is the significance of the “this” parameter? -Done
  37. What is the significance of the “super” parameter? -Done
  38. What are the wrapper classes for the primitive data types? -Done
  39. What is an array? – Done
  40. (Not a question) An array is an object that contains a collection of elements of the same type, indexed by a number starting with 0. An array variable is a reference to an array object.
  41. Write the code snippet to declare a variable “a” as an integer array that can hold 5 integer values? – Done
  42. What are the three java Collection classes? Give an example where each would be used? – Done
  43. What is the difference between abstract class vs interfaces? -Done
  44. What is a recursive function? -Done

Leave a Reply