Friday 28 June 2013

MostImp Question :

28-06-2013

  1. Difference between overloading and overridin ?
  2. Difference between Vector and ArrayList ?
  3. Difference between Set and List ?
  4. How to make a class immutable in java?
  5. What is generic in java ?
  6. What about hashCode ? Detailed description of HashCode ?
  7. Types of statement in java ?
  8. How to load a class in java ? Define the complete Code ? Class.forName("sun.jdbc.odbc.JdbcOdbc");?Types of drivers in JDBC ?
  9. How to use callable Statement in java ?
  10. What id DI in Spring ?
  11. Types of Dependency Injection in Spring ?
  12. Why spring is lightWeight ?
  13. What is the Hibernate configuration file ?
  14. Hibernate ONE-TO-ONE mapping configuration ?

List Of Interview Questions:

  1. Can Java thread object invoke start method twice?
  2. Give the list of Java Object class methods.
  3. Can we call servlet destory() from service()?
  4. Can we override static method?
  5. Can you list serialization methods?
  6. What is the difference between super() and this()?
  7. How to prevent a method from being overridden?
  8. Can we create abstract classes without any abstract methods?
  9. How to destroy the session in servlets?
  10. Can we have static methods in interface?
  11. What is transient variable?
  12. Incase, there is a return at the end of try block, will execute finally block?
  13. What is abstract class or abstract method?
  14. What is default value of a boolean?
  15. When to use LinkedList or ArrayList?
  16. What is daemon thread?
  17. Does each thread in java uses seperate stack?
  18. What is the difference between Enumeration and Iterator?
  19. Find out switch statement output.
  20. Does system.exit() in try block executes finally block?
  21. What is fail-fast in java?
  22. What is final, finally and finalize?
  23. In java, are true and false keywords?
  24. What are the different session tracking methods?
  25. What is the purpose of garbage collection?
  26. What are the types of ResultSet?
  27. What is difference between wait and sleep methods in java?
  28. What is servlet context?
  29. What happens if one of the members in a class does not implement Serializable interface?
  30. What is race condition?
  31. How to get current time in milli seconds?
  32. How can you convert Map to List?
  33. What is strictfp keyword?
  34. What is System.out in Java?
  35. What is difference between ServletOuptputStream and PrintWriter?
  36. What is java static import?
  37. When to use String and StringBuffer?
  38. What is difference between StringBuffer and StringBuilder?
  39. What is wrapper class in java?
  40. Is Iterator a Class?
  41. What is java classpath?
  42. Can a class in java be private?
  43. Is null a keyword in java?
  44. What is the initial state of a thread when it is started?
  45. What is the super class for Exception and Error?
  46. What is Class.forName()?
  47. Can interface be final?
  48. What is the difference between exception and error?
  49. What is default value of a local variables?
  50. What is local class in java?
  51. Can we initialise uninitialized final variable?
  52. Can we declare abstract method as final?
  53. Can we have finally block without catch block?
  54. What is pass by value and pass by reference?
  55. Can we declare main method as private?
  56. What is the difference between preemptive scheduling and time slicing?
  57. Can non-static member classes (Local classes) have static members?
  58. What are the environment variables do we neet to set to run Java?
  59. Can you serialize static fields of a class?
  60. What is the difference between declaring a variable and defining a variable?
  61. Where can we use serialization?
  62. What modifiers are allowed for methods in an Interface?
  63. What is the purpose of Runtime and System class?
  64. Which one is faster? ArrayList or Vector? Why?
  65. What is the difference between static synchronized and synchronized methods?
  66. What is the order of catch blocks when catching more than one exception?
  67. What is the difference between the prefix and postfix forms of the increment(++) operator?
  68. What is hashCode?
  69. What is the difference between Hashtable and HashMap?
  70. What are the restrictions when overriding a method?
  71. What is the use of assert keyword?
  72. What is adapter class?
  73. What is difference between break, continue and return statements?
  74. What is the difference between while and do-while statements?
  75. When does the compiler provides the default constructor?
  76. List Of All Interview Programs:

    1. Find out duplicate number between 1 to N numbers.
    2. Find out middle index where sum of both ends are equal.
    3. Write a singleton class.
    4. Write a program to create deadlock between two threads.
    5. Write a program to reverse a string using recursive algorithm.
    6. Write a program to reverse a number.
    7. Write a program to convert decimal number to binary format.
    8. Write a program to find perfect number or not.
    9. Write a program to implement ArrayList.
    10. Write a program to find maximum repeated words from a file.
    11. Wrie a program to find out duplicate characters in a string.
    12. Write a program to find top two maximum numbers in a array.
    13. Write a program to sort a map by value.
    14. Write a program to find common elements between two arrays.
    15. How to swap two numbers without using temporary variable?
    16. Write a program to print fibonacci series.
    17. Write a program to find sum of each digit in the given number using recursion.
    18. Write a program to check the given number is a prime number or not?
    19. Write a program to find the given number is Armstrong number or not?
    20. Write a program to convert binary to decimal number.
    21. Write a program to check the given number is binary number or not?
    22. Write a program for Bubble Sort in java.
    23. Write a program for Insertion Sort in java.
    24. Write a program to implement hashcode and equals.
    25. How to get distinct elements from an array by avoiding duplicate elements?
    26. Write a program to get distinct word list from the given file.
    27. Write a program to get a line with max word count from the given file.
    28. Write a program to convert string to number without using Integer.parseInt() method.
    29. Write a program to find two lines with max characters in descending order.
    30. Write a program to find the sum of the first 1000 prime numbers.
  77. Java Search Algorithms

    Search algorithm is an algorithm for finding an item with specified properties among a collection of items. The items may be stored individually as records in a database or may be elements of a search space defined by a mathematical formula or procedure, such as the roots of an equation with integer variables or a combination of the two.
    You can find examples for different types of search algorithms here.

    Java Search Algorithms Examples

    1. Write a program to implement Linear search or Sequential search algorithm.
    2. Implement Binary search in java using divide and conquer technique.
    3. Implement Binary search in java using recursive algorithm.

No comments:

Post a Comment