Anda di halaman 1dari 3

Java with Data Structures Qn Bank

01. Explain the difference between static variables and instance variables. 02. What do you mean by constructor overloading? Explain it with the help of an Example. 03. Explain the usage of the keyword 'Final' in they Java programming language. 04. Explain the finalize method. 05. How are arrays created in Java? Explain the creation of a 2-dimensional array to store floating point variables. 06. What do you mean by uneven or jagged arrays? 07. Explain how abstract classes are created in Java with the help of an example. 08. Explain the inheritance mechanism implemented in the Java language with the help of an example. 09. What are packages? Why are they used? 10. Explain the usage of the keyword 'import' in the Java language. 11. What are Interfaces? How are they created and implemented? 12. Give the name of 5 packages which are available in the Java library and name at least 2 classes from each package. 13. Write a program in Java to take the input from the user through the keyboard & write it to a file. 14. Explain 5 methods related to the class 'File'. 15. Explain 2 ways of creating a File object. 16. Explain 4 constructors from the class 'String'. OR 16. How are String objects created? 17. Explain 5 String handling methods with the help of examples.

18. What do you mean by Hashing? Explain any 2 hashing functions. 19. What do you mean by 'Collision' in context of hashing? How are these Collisions resolved? Give an example. 20. Explain the 'Stack' data structure and its associated operations. 21. Explain the 'Queue' data structure and its associated operations. 22. Explain 'Linked List' & 'Doubly Linked List'. When is a 'Linked List' preferred over an 'Array'? 23. Diagrammatically show the deletion of a node from a 'Doubly Linked List'. 24. Diagrammatically show the insertion of a node into a 'Linked List'. 25. Write a code snippet to return the number of nodes in a linked list. 26. Write a program in Java to implement a 'Stack' data structure using 'Array' as the underlying structure. 27. Explain the following terms in relation to trees: a] Child b] Parent c] Grandparent d] Root e] Siblings f] Height of a Tree 28. Explain Binary Tree. 29. Explain the 3 Traversal Procedures for a tree. 30. What are AVL Trees? 31. What are B-Trees? 32. Explain with the help of an example - Insertion Sort, Selection Sort and Merge Sort.

33. Explain Binary Search Procedure. 34. Explain the following statement, "Java is a simple, object oriented, robust, architecturally neutral, secure, portable, multi-threaded and network savvy programming language.". 35. Explain the 'Exception Handling' mechanism in Java with the help of an example. 36. Explain how threads are created in Java with the help of an example. OR 36. Explain how multi-threading is achieved in Java with the help of an example. 37. Explain with the help of an example how graphs are represented using 'Adjacency Matrix'. 38. Explain how graphs are represented using 'Linked List' representation. 39. What do you mean by 'Heaps'? Give an example. 40. Draw the table which shows the scope of a variable at various levels in the Java Language.

Anda mungkin juga menyukai