0% found this document useful (0 votes)
10 views10 pages

Interview questions

Uploaded by

ariyanpandey1998
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views10 pages

Interview questions

Uploaded by

ariyanpandey1998
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

top 50 java interview questions

Basic Concepts

1. What is Java?

2. What are the features of Java?

3. What is the difference between JDK, JRE, and JVM?

4. What is the significance of the public static void main(String[] args) method?

5. What is a constructor in Java?

6. What is the difference between an instance variable and a local variable?

7. What is inheritance in Java?

8. What is polymorphism?

9. What is encapsulation?

10. What is abstraction?

OOP Concepts

11. What is the difference between an interface and an abstract class?

12. What is method overloading?

13. What is method overriding?

14. What is the difference between super and this?

15. What is the difference between final, abstract, and static keywords?

16. What is the difference between private, protected, and public access modifiers?

17. What is a package in Java?

18. What is the difference between extends and implements?

Collections Framework

19. What is the Collections Framework in Java?

20. What is the difference between ArrayList and Vector?

21. What is the difference between LinkedList and ArrayList?

22. What is a HashMap?

23. What is the difference between HashMap and Hashtable?

24. What is a HashSet?

25. What is the difference between Set, List, and Map?

Exception Handling

26. What is an exception in Java?


27. What is the difference between throw and throws?

28. What is the difference between checked and unchecked exceptions?

29. What is the purpose of the finally block?

30. What is the difference between try-catch and try-with-resources?

Multithreading

31. What is a thread in Java?

32. What is the difference between synchronized and volatile?

33. What is the Runnable interface?

34. What is the Callable interface?

35. What is the difference between Thread and Runnable?

36. What is a deadlock?

37. What is a race condition?

38. What is thread pooling?

39. What is the ExecutorService?

Java 8 Features

40. What is a lambda expression in Java?

41. What is the Stream API?

42. What is the difference between parallelStream() and stream()?

43. What is a functional interface?

44. What is the Optional class?

45. What is the Date and Time API?

Design Patterns

46. What is the Singleton design pattern?

47. What is the Factory design pattern?

48. What is the Observer design pattern?

49. What is the Strategy design pattern?

50. What is the Decorator design pattern?

top 50 oops interview questions

Basic Concepts

1. What is Object-Oriented Programming (OOP)?


2. What are the four main principles of OOP?

3. Explain the concept of inheritance.

4. What is polymorphism and how is it used in OOP?

5. Describe encapsulation and its importance.

6. What is abstraction and how does it benefit OOP?

7. How do you implement an interface in Java?

8. What is the difference between an interface and an abstract class?

9. Explain the concept of method overriding.

10. What is method overloading?

11. How do you achieve multiple inheritance in Java?

12. What is the difference between static and dynamic binding?

13. Explain the concept of a constructor in OOP.

14. What is the purpose of a destructor?

15. How do you handle exceptions in OOP?

16. What is the difference between a class and an object?

17. Explain the concept of a superclass and a subclass.

18. What is the difference between composition and inheritance?

19. How do you implement a singleton design pattern?

20. What is the factory design pattern?

21. Explain the concept of a decorator pattern.

22. What is the difference between aggregation and composition?

23. How do you implement the observer design pattern?

24. What is the difference between shallow copy and deep copy?

25. Explain the concept of a proxy pattern.

Advanced Concepts

26. What is the difference between an abstract class and an interface?

27. How do you implement the strategy design pattern?

28. What is the difference between a class variable and an instance variable?

29. Explain the concept of a package in Java.

30. What is the difference between a method and a function?

31. How do you implement the command design pattern?


32. What is the difference between a method and a constructor?

33. Explain the concept of a namespace.

34. What is the difference between a class and a struct?

35. How do you implement the template method design pattern?

36. What is the difference between a static method and an instance method?

37. Explain the concept of a final class.

38. What is the difference between a private and a protected member?

39. How do you implement the observer design pattern?

40. What is the difference between a class and an object?

41. Explain the concept of a superclass and a subclass.

42. What is the difference between static and dynamic binding?

43. How do you handle exceptions in OOP?

44. What is the difference between a class variable and an instance variable?

45. Explain the concept of a package in Java.

46. What is the difference between a method and a function?

47. How do you implement the strategy design pattern?

48. What is the difference between a static method and an instance method?

49. Explain the concept of a final class.

50. What is the difference between a private and a protected member?

top 50 dbms sql interview questions

Basic SQL Queries

1. What is SQL?

2. What is the difference between SQL and MySQL?

3. What is a primary key?

4. What is a foreign key?

5. What is a unique key?

6. What is a composite key?

7. What is normalization?

8. What is denormalization?

9. What is the difference between JOIN and INNER JOIN?

10. What is the difference between UNION and UNION ALL?


11. What is the difference between GROUP BY and ORDER BY?

12. What is the difference between HAVING and WHERE?

13. What is the difference between DISTINCT and GROUP BY?

14. What is the difference between COUNT and SUM?

15. What is the difference between MAX and MIN?

16. What is the difference between LIKE and IN?

17. What is the difference between NOT IN and <>?

18. What is the difference between NULL and 0?

19. What is the difference between NULL and '' (empty string)?

20. What is the difference between NULL and FALSE?

Advanced SQL Queries

21. What is a subquery?

22. What is a correlated subquery?

23. What is a CTE (Common Table Expression)?

24. What is a window function?

25. What is the difference between RANK(), DENSE_RANK(), and ROW_NUMBER()?

26. What is the difference between LAG() and LEAD()?

27. What is the difference between FIRST_VALUE() and LAST_VALUE()?

28. What is the difference between EXISTS and IN?

29. What is the difference between ANY and ALL?

30. What is the difference between INTERSECT and EXCEPT?

31. What is the difference between OUTER JOIN and CROSS JOIN?

32. What is the difference between LEFT JOIN and RIGHT JOIN?

33. What is the difference between FULL OUTER JOIN and CROSS JOIN?

34. What is the difference between INNER JOIN and OUTER JOIN?

35. What is the difference between CROSS JOIN and SELF JOIN?

36. What is the difference between SELF JOIN and CROSS JOIN?

37. What is the difference between CROSS JOIN and FULL OUTER JOIN?

38. What is the difference between FULL OUTER JOIN and LEFT JOIN?

39. What is the difference between LEFT JOIN and RIGHT JOIN?

40. What is the difference between RIGHT JOIN and FULL OUTER JOIN?
Database Design and Management

41. What is database normalization?

42. What is database denormalization?

43. What is the difference between DELETE and TRUNCATE?

44. What is the difference between DROP and DELETE?

45. What is the difference between ALTER and MODIFY?

46. What is the difference between UPDATE and INSERT?

47. What is the difference between INSERT and MERGE?

48. What is the difference between MERGE and UPDATE?

49. What is the difference between SELECT and INSERT?

50. What is the difference between SELECT and UPDATE?

top 20 python interview questions

Basic Concepts

1. What is Python?

2. What are the features of Python?

3. What is the difference between Python 2 and Python 3?

4. What is PEP 8 and why is it important?

5. What is the __init__ method in Python?

6. What is the difference between a list and a tuple?

7. What is the difference between append() and extend() methods in Python?

8. How do you create a virtual environment in Python?

9. What is the Global Interpreter Lock (GIL)?

10. What is the difference between == and is operators?

Data Structures

11. What is a dictionary in Python?

12. How do you iterate over a dictionary?

13. What is the difference between keys(), values(), and items() methods?

14. What is a set in Python?

15. How do you remove duplicates from a list?

16. What is the difference between list and array in Python?

17. What is a deque in Python?


18. How do you reverse a list in Python?

19. What is a heap in Python?

20. What is the difference between zip() and enumerate()?

Advanced Topics

21. What is a generator in Python?

22. How do you implement a decorator in Python?

23. What is the difference between map(), filter(), and reduce()?

24. How do you handle exceptions in Python?

25. What is the difference between try-except and try-finally?

26. What is the with statement used for in Python?

27. How do you write unit tests in Python?

28. What is the difference between pickle and shelve modules?

29. What is the yield keyword used for?

30. How do you profile a Python script?

top 20 networking interview questions

Basic Concepts

1. What is a network?

2. What is the difference between LAN, MAN, and WAN?

3. What is a node in networking?

4. What is a router and what does it do?

5. What is a switch and how does it differ from a router?

6. What is a hub and how does it work?

7. What is a firewall and why is it important?

8. What is a VPN and how does it work?

9. What is a subnet mask?

10. What is the purpose of an IP address?

Network Protocols

11. What is TCP/IP?

12. What is HTTP and how does it work?

13. What is HTTPS and how does it differ from HTTP?

14. What is FTP and what is it used for?


15. What is DNS and why is it important?

16. What is DHCP and how does it work?

17. What is ICMP and what is its purpose?

18. What is SSL/TLS and why is it important?

19. What is the difference between IPv4 and IPv6?

20. What is a MAC address?

top 20 cloud interview questions

Basic Concepts

1. What is cloud computing?

2. What are the main service models of cloud computing?

3. What is the difference between IaaS, PaaS, and SaaS?

4. What is virtualization?

5. What is the difference between public, private, and hybrid cloud?

6. What is cloud storage?

7. What is the difference between cloud computing and traditional data centers?

8. What is scalability in cloud computing?

9. What is elasticity in cloud computing?

10. What is the difference between on-premises and cloud computing?

Security and Compliance

11. How do you ensure data security in the cloud?

12. What is encryption and how is it used in cloud computing?

13. What is multi-factor authentication (MFA)?

14. What is a virtual private cloud (VPC)?

15. How do you handle compliance in the cloud?

16. What is the shared responsibility model in cloud security?

17. What is identity and access management (IAM)?

18. How do you protect against DDoS attacks in the cloud?

19. What is a security group in cloud computing?

20. How do you implement network security in the cloud?

top 50 data structure interview questions

Basic Concepts
1. What is a data structure?

2. What are the main types of data structures?

3. What is the difference between linear and non-linear data structures?

4. What is an array?

5. What is a linked list?

6. What is a stack?

7. What is a queue?

8. What is a tree?

9. What is a graph?

10. What is a hash table?

Arrays and Lists

11. How do you insert an element into an array?

12. How do you delete an element from an array?

13. What is the difference between an array and a linked list?

14. How do you reverse a linked list?

15. What is the time complexity of accessing an element in an array?

16. What is the time complexity of accessing an element in a linked list?

17. How do you detect a loop in a linked list?

18. How do you implement a stack using a linked list?

19. How do you implement a queue using a linked list?

20. What is the difference between a stack and a queue?

Trees and Graphs

21. What is a binary tree?

22. What is a binary search tree?

23. How do you insert a node into a binary search tree?

24. How do you delete a node from a binary search tree?

25. What is the difference between a binary tree and a binary search tree?

26. What is a balanced tree?

27. What is a binary heap?

28. What is a B-tree?

29. What is a trie?


30. What is a graph traversal algorithm?

Advanced Topics

31. What is dynamic programming?

32. What is memoization?

33. What is a hash function?

34. What is collision resolution in a hash table?

35. What is the difference between breadth-first search and depth-first search?

36. What is Dijkstra's algorithm?

37. What is A* search algorithm?

38. What is Kruskal's algorithm?

39. What is Prim's algorithm?

40. What is Floyd-Warshall algorithm?

Miscellaneous

41. What is the difference between == and equals() in Java?

42. What is the difference between compareTo() and compare() in Java?

43. What is the difference between ArrayList and LinkedList in Java?

44. What is the difference between HashMap and Hashtable in Java?

45. What is the difference between HashSet and TreeSet in Java?

46. What is the difference between Queue and Deque in Java?

47. What is the difference between Stack and Deque in Java?

48. What is the difference between PriorityQueue and Queue in Java?

49. What is the difference between LinkedList and ArrayList in Java?

50. What is the difference between HashMap and LinkedHashMap in Java?

You might also like