This document contains 61 interview questions related to Java concepts like OOPs, inheritance, abstraction, encapsulation, exception handling, collections, strings, and SQL concepts like joins, aggregation, stored procedures. The questions cover topics like finding the 3rd highest salary from a database table, implementing bonuses based on experience, handling exceptions, difference between abstract class and interface, static and non-static methods, difference between List and Set, reversing a string while preserving space positions, and sorting an ArrayList in descending order.
This document contains 61 interview questions related to Java concepts like OOPs, inheritance, abstraction, encapsulation, exception handling, collections, strings, and SQL concepts like joins, aggregation, stored procedures. The questions cover topics like finding the 3rd highest salary from a database table, implementing bonuses based on experience, handling exceptions, difference between abstract class and interface, static and non-static methods, difference between List and Set, reversing a string while preserving space positions, and sorting an ArrayList in descending order.
This document contains 61 interview questions related to Java concepts like OOPs, inheritance, abstraction, encapsulation, exception handling, collections, strings, and SQL concepts like joins, aggregation, stored procedures. The questions cover topics like finding the 3rd highest salary from a database table, implementing bonuses based on experience, handling exceptions, difference between abstract class and interface, static and non-static methods, difference between List and Set, reversing a string while preserving space positions, and sorting an ArrayList in descending order.
This document contains 61 interview questions related to Java concepts like OOPs, inheritance, abstraction, encapsulation, exception handling, collections, strings, and SQL concepts like joins, aggregation, stored procedures. The questions cover topics like finding the 3rd highest salary from a database table, implementing bonuses based on experience, handling exceptions, difference between abstract class and interface, static and non-static methods, difference between List and Set, reversing a string while preserving space positions, and sorting an ArrayList in descending order.
1. Oops concept and explain how you have implemented in your project. 2. Finding 3rd highest salary from emp table? 3. Difference b/w union and joins in sql? 4. Apply bonus to employees based on experience in emp table? 5. Abstraction & where it is used in your project? 6. Diff between Abstract class & interface? 7. What is static keyword in Java 8. What method Overloading & Overriding? 9. What are difference between throws and thrown ? 10. How you handle exceptions ? 11. - How many times you can write catch block ? 12. - When finally block get executed ? 13. This keyword 14. Final keyword 15. Static keyword 16. Access modifiers 17. Exception handling types 18. Inheritance 19. Class nd interface difference 20. Abstract 21. Why main method is static? 22. What is Run time polymorphism 23. Difference between list and set 24. Method overloading and overriding 25. Use of constructor 26. Difference between static and non static methods 27. what is the difference between fileinputstream and fileoutpustream. 28. please learn these programs too : 29. Write the code for duplicating a string by using hashmap 30. write a program to count number of words in a string by using hashmap 31. write a program for getting sample word which is in this order Sample Sampl Samp Sam Sa S 32. what are oops concepts? 33. what is the difference between data abstraction and encapsulation where you have implemented in your project. 34. what is this and super keyword and difference. 35. SQL where clause, aggregation, group. 36. Primitives and Non Primitives datatypes in java? String is primitive or non primitive 37. What is Hashmap ? Can we store objects in hash map and how to retrieve them? 38. Java- Write a Java program to print 1234 1234 in two rows. 39. Explain Set and Map in Java. 40. Explain inner join and outer join in SQL. 41. Explain about collections. 42. "Move all zeroes to end of array- Given an array of integers,Move the all zero's to end of the array. Push all the zero’s of a given array to the end of the array. Example 1: INPUT: myArray={2,5,0,4,2,7,0,0,1,9,4} ---OUTPUT: myArray={2,5,4,2,7,1,9,4,0,0,0}" 43. "Print all the duplicate character and their count in the given string. Example 1: INPUT : String str=""hcl-tech"" ---OUTPUT :h-2,c-2" 44. Reverse a string preserving space positions. INPUT : "Java is a programming language" --- OUTPUT : "egau gn a lgnimmargor pasiavaJ" 45. Can we over load main method in java? 46. "Which catch block will get execute first. There are two catch blocks in first catch block have exception e and second catch block have arithmetic expections and will expect arithmetic exception in try block then which catch block will get execute first?" 47. "6. String s1= ""hello""; String s2=""hello""; If(s1==s2) then tell me if it's true or false." 48. "String s =""hello""; s.concate(""world""); What is the output?" 49. what is String Pool. 50. difference between String Builder and String Buffer? 51. What are different memory types in JVM 52. what is the difference between ArrayList and Vector 53. what is clone and where did you use 54. How hash map works internally and how its generate hash code? 55. Difference between ETL and SQL ? 56. Is hashmap thread safe? 57. What is stored procedure? 58. Write a query to find 2nd highest salary? 59. For a string ""Welcome to moolya"" write a code in java to print the repeated character and display how many times it is repeated 60. Given arraylist =[2,5,1,10,20,20,15] Sort them in descending order 61. Write a code to print in the following sequence: 1 2 3 4 hi 6 7 8 9 hi .........1000