Typical java interview questions sorted by experience
Junior
* Name some of the characteristics of OO programming languages
* What are the access modifiers you know? What does each one do?
* What is the difference between overriding and overloading a method in Java?
* What’s the difference between an Interface and an abstract class?
* Can an Interface extend another Interface?
* What does the static word mean in Java?
* Can a static method be overridden in Java?
* What is Polymorphism? What about Inheritance?
* Can a constructor be inherited?
* Do objects get passed by reference or value in Java? Elaborate on that.
* What’s the difference between using == and .equals on a string?
* What is the hashCode() and equals() used for?
* What does the interface Serializable do? What about Parcelable in Android?
* Why are Array and ArrayList different? When would you use each?
* What’s the difference between an Integer and int?
* What is a ThreadPool? Is it better than using several “simple” threads?
* What the difference between local, instance and class variables?
Mid
* What is reflection?
* What is dependency injection? Can you name a few libraries? (Have you used any?)
* What are strong, soft and weak references in Java?
* What does the keyword synchronized mean?
* Can you have “memory leaks” on Java?
* Do you need to set references to null on Java/Android?
* What does it means to say that a String is immutable?
* What are transient and volatile modifiers?
* What is the finalize() method?
* How does the try{} finally{} works?
* What is the difference between instantiation and initialisation of an object?
* When is a static block run?
* Why are Generics are used in Java?
* Can you mention the design patterns you know? Which of those do you normally use?
* Can you mention some types of testing you know?
Senior
* How does Integer.parseInt() works?
* Do you know what is the “double check locking” problem?
* Do you know the difference between StringBuffer and StringBuilder?
* How is a StringBuilder implemented to avoid the immutable string allocation problem?
* What does Class.forName method do?
* What is Autoboxing and Unboxing?
* What’s the difference between an Enumeration and an Iterator?
* What is the difference between fail-fast and fail safe in Java?
* What is PermGen in Java?
* What is a Java priority queue?
* *s performance influenced by using the same number in different types: Int, Double and Float?
* What is the Java Heap?
* What is daemon thread?
* Can a dead thread be restarted?
Source: medium.
Junior
* Name some of the characteristics of OO programming languages
* What are the access modifiers you know? What does each one do?
* What is the difference between overriding and overloading a method in Java?
* What’s the difference between an Interface and an abstract class?
* Can an Interface extend another Interface?
* What does the static word mean in Java?
* Can a static method be overridden in Java?
* What is Polymorphism? What about Inheritance?
* Can a constructor be inherited?
* Do objects get passed by reference or value in Java? Elaborate on that.
* What’s the difference between using == and .equals on a string?
* What is the hashCode() and equals() used for?
* What does the interface Serializable do? What about Parcelable in Android?
* Why are Array and ArrayList different? When would you use each?
* What’s the difference between an Integer and int?
* What is a ThreadPool? Is it better than using several “simple” threads?
* What the difference between local, instance and class variables?
Mid
* What is reflection?
* What is dependency injection? Can you name a few libraries? (Have you used any?)
* What are strong, soft and weak references in Java?
* What does the keyword synchronized mean?
* Can you have “memory leaks” on Java?
* Do you need to set references to null on Java/Android?
* What does it means to say that a String is immutable?
* What are transient and volatile modifiers?
* What is the finalize() method?
* How does the try{} finally{} works?
* What is the difference between instantiation and initialisation of an object?
* When is a static block run?
* Why are Generics are used in Java?
* Can you mention the design patterns you know? Which of those do you normally use?
* Can you mention some types of testing you know?
Senior
* How does Integer.parseInt() works?
* Do you know what is the “double check locking” problem?
* Do you know the difference between StringBuffer and StringBuilder?
* How is a StringBuilder implemented to avoid the immutable string allocation problem?
* What does Class.forName method do?
* What is Autoboxing and Unboxing?
* What’s the difference between an Enumeration and an Iterator?
* What is the difference between fail-fast and fail safe in Java?
* What is PermGen in Java?
* What is a Java priority queue?
* *s performance influenced by using the same number in different types: Int, Double and Float?
* What is the Java Heap?
* What is daemon thread?
* Can a dead thread be restarted?
Source: medium.
❤4🔥1
Java project ideas to help you practice your skills
1. ToDo List Application: Create a command-line or GUI-based application that allows users to create, manage, and organize their tasks.
2. Calculator: Build a simple calculator application that can perform basic arithmetic operations like addition, subtraction, multiplication, and division.
3. Library Management System: Design a system for managing library resources, including books, patrons, and borrowing records.
4. Chat Application: Develop a chat application that enables users to communicate in real-time, either as a desktop app or through a web interface.
5. Weather App: Create an app that fetches weather data from an API and displays current weather conditions for a given location.
6. Student Gradebook: Build a program to store and calculate student grades. You can add features like grade averages and report generation.
7. Expense Tracker: Create an application for tracking expenses and generating reports, helping users manage their finances.
8. Simple Game (e.g., Tic-Tac-Toe): Implement a classic game like Tic-Tac-Toe to learn about game logic and user interaction.
9. Blog or Content Management System (CMS): Build a simple blog or CMS where users can create, edit, and publish articles.
10. E-commerce Shopping Cart: Create a basic online shopping cart system with product listings, a shopping cart, and checkout functionality.
11. File Manager: Develop a file manager application that allows users to organize and manage files and directories on their computer.
12. Inventory System: Design an inventory management system for tracking products, quantities, and orders for a small business.
13. Music Player: Create a basic music player with features like play, pause, skip, and a library of songs.
14. Password Manager: Build a secure application for storing and managing passwords and other sensitive information.
15. Chess or Sudoku Solver: Implement a chess game or a Sudoku puzzle solver to delve into complex algorithms and logic.
16. Note-taking App: Develop a note-taking application with features like creating, editing, and organizing notes.
17. Expense Sharing App: Build an app for groups to track shared expenses and split bills among friends or roommates.
18. Task Scheduler: Create a program that allows users to schedule and manage tasks, reminders, and appointments.
19. Mini Social Media Platform: Create a simplified social media platform with features like user profiles, posting, and commenting.
20. Quiz or Flashcard Application: Design an app for creating and taking quizzes or using flashcards to study various topics.
Choose a project that aligns with your interests and skill level. As you work on these projects, you'll gain valuable experience and improve your Java programming skills.
1. ToDo List Application: Create a command-line or GUI-based application that allows users to create, manage, and organize their tasks.
2. Calculator: Build a simple calculator application that can perform basic arithmetic operations like addition, subtraction, multiplication, and division.
3. Library Management System: Design a system for managing library resources, including books, patrons, and borrowing records.
4. Chat Application: Develop a chat application that enables users to communicate in real-time, either as a desktop app or through a web interface.
5. Weather App: Create an app that fetches weather data from an API and displays current weather conditions for a given location.
6. Student Gradebook: Build a program to store and calculate student grades. You can add features like grade averages and report generation.
7. Expense Tracker: Create an application for tracking expenses and generating reports, helping users manage their finances.
8. Simple Game (e.g., Tic-Tac-Toe): Implement a classic game like Tic-Tac-Toe to learn about game logic and user interaction.
9. Blog or Content Management System (CMS): Build a simple blog or CMS where users can create, edit, and publish articles.
10. E-commerce Shopping Cart: Create a basic online shopping cart system with product listings, a shopping cart, and checkout functionality.
11. File Manager: Develop a file manager application that allows users to organize and manage files and directories on their computer.
12. Inventory System: Design an inventory management system for tracking products, quantities, and orders for a small business.
13. Music Player: Create a basic music player with features like play, pause, skip, and a library of songs.
14. Password Manager: Build a secure application for storing and managing passwords and other sensitive information.
15. Chess or Sudoku Solver: Implement a chess game or a Sudoku puzzle solver to delve into complex algorithms and logic.
16. Note-taking App: Develop a note-taking application with features like creating, editing, and organizing notes.
17. Expense Sharing App: Build an app for groups to track shared expenses and split bills among friends or roommates.
18. Task Scheduler: Create a program that allows users to schedule and manage tasks, reminders, and appointments.
19. Mini Social Media Platform: Create a simplified social media platform with features like user profiles, posting, and commenting.
20. Quiz or Flashcard Application: Design an app for creating and taking quizzes or using flashcards to study various topics.
Choose a project that aligns with your interests and skill level. As you work on these projects, you'll gain valuable experience and improve your Java programming skills.
❤4