ced Java Interview Questions Exercises Examples Quizzes Projects Cheatsheet DSA in J
Java Tutorial
Last Updated : 13 Oct, 2025
Java is a high-level, object-oriented programming language used to build
web apps, mobile applications, and enterprise software systems.
Known for its Write Once, Run Anywhere capability, which means code
written in Java can run on any device that supports the Java Virtual
Machine (JVM).
Syntax and structure is similar to C-based languages like C++ and C#.
1/7
Try our ongoing free courses Java Skillup and Advance Java Skillup
with weekly topic coverage, notes, daily quizzes and coding
problems.
Why Learn Java?
Used to build Android apps, desktop and web apps, enterprise backend
systems, and cloud-based software.
In high demand with many job opportunities in software development.
Has popular frameworks like Spring and Hibernate which makes it
powerful for enterprise applications.
Supports object-oriented programming for clean, maintainable and
reusable code.
Top companies like Amazon, Netflix, and LinkedIn use Java.
Basics
Java basics form the foundation of your programming journey, covering
essential concepts like syntax, data types, variables, loops, and
conditionals.
Introduction
Download and Install Java
JDK vs JRE vs JVM
Identifiers
Keywords
Quiz: Java Basics and Identifiers
Data Types
Variables
Operators
Quiz: Variables, Operator
Decision Making
Loops & Jump Statements
Quiz: Control Statements and Loops
Project: Number Guessing Game
Methods
Java methods are reusable blocks of code that perform specific tasks
and help organize your program. They improve code readability, reduce
repetition, and make debugging easier.
We'llAd
try served
Adnot
by
to show
closed by that ad again
Stop seeing this ad
Why this ad?
Introduction to Methods
Static Methods vs Instance Methods
Access Modifiers
Command Line Arguments
Variable Arguments (Varargs)
Quiz: Methods
Arrays
Java arrays are containers that store multiple values of the same data
type in a single variable. They provide an efficient way to manage and
access collections of data using index-based positions.
Introduction
Declare and Initialize Arrays
Multi-Dimensional Arrays
Quiz: Java Arrays
Jagged Arrays
Arrays Class
Final Arrays
Quiz: Array
Projects: Tic-Tac-Toe Game
Strings
Java Strings represent sequences of characters and are widely used in
text processing. They are immutable, meaning once created, their values
cannot be changed.
Introduction
Why Strings are Immutable
String Concatenation
String Methods
Quiz: String Basics
String Class
StringBuffer Class
StringBuilder Class
Quiz: String Classes
Strings vs StringBuffer vs StringBuilder
Regex
Java Regex (Regular Expressions) allows pattern matching and text
manipulation using the [Link] package. It is powerful for
validating, searching, and replacing strings based on specific patterns.
What is Java Regex?
Pattern Class
Matcher Class
Character Class
Quantifiers
Quiz: Regex Basics and Pattern Matching
OOP Concepts
Java follows the Object-Oriented Programming (OOP) paradigm, which
organizes code into classes and objects. Core OOP principles like
inheritance, encapsulation, polymorphism, and abstraction make Java
modular and scalable.
What are OOP Concepts?
Classes and Objects
Quiz: Classes and Objects
Constructors
Quiz: Constructors
Object Class
Abstraction
Encapsulation
Inheritance
Quiz: Inheritance and Abstraction
Polymorphism
Packages
Quiz: Polymorphism and Packages
Project: Simple Banking Application
Interfaces
Java interfaces define a contract that classes must follow, specifying
method signatures without implementations. They enable abstraction and
support multiple inheritance in Java through a clean, structured approach.
Interfaces
Class vs Interface
Quiz: Interfaces
Functional Interface
Nested Interface
Marker Interface
Quiz: Interface types and Comparator
Project: Employee Management System
Exception Handling
Java Exception Handling is a mechanism to handle runtime errors,
ensuring the program runs smoothly without crashing. It uses keywords
like try, catch, throw, throws, and finally to manage exceptions.
Exceptions
Quiz: Java Exceptions
Final, Finally and Finalize
Throw and Throws
Customized Exception Handling
Chained Exceptions
Null Pointer Exceptions
Exception Handling with Method Overriding
Quiz: Exception Handling
Memory Allocation
Java Memory Allocation refers to how memory is assigned to variables,
objects, and classes during program execution. It involves stack and heap
memory, with the JVM managing allocation and garbage collection
automatically.
Java Memory Management
How Java Objects Stored in Memory?
Quiz: Java Memory Allocation
Types of Memory Areas Allocated by JVM
Stack vs Heap Memory Allocation
Quiz: Heap vs Stack
Garbage Collection
Quiz: JVM Memory Management and Garbage Collection
Types of JVM Garbage Collectors
Memory Leaks
Collections
Java Collections provide a framework for storing and manipulating groups
of objects efficiently. It includes interfaces like List, Set, and Map, along
with classes like ArrayList, HashSet, and HashMap.
Collections Class
Collection Interface
Quiz: Collection
List Interface
ArrayList
LinkedList
Quiz: List, ArrayList, LinkedList
Set Interface
HashSet
TreeSet
Quiz: Set and HashSet
Queue Interface
Priority Queue
Deque Interface
Map Interface
HashMap
Quiz: Queue and Map Interface
Iterator
Comparator Interface
Comparable Interface
Quiz: Iterators, Comparator vs Comparable
Project: Face Detection System
Lambda Expressions and Streams
Java Streams and Lambda Expressions simplify data processing by
enabling functional-style operations on collections. Lambdas provide
concise syntax for anonymous functions, while Streams allow efficient
filtering, mapping, and reduction of data.
Lambda Expressions
Method References
Java Streams
Quiz: Lambda Expressions and Streams
To know Java 8 in detail, refer to - Java 8 Features
Multithreading and Synchronization
Java Multithreading allows concurrent execution of two or more threads,
enabling efficient CPU utilization and faster program performance. It is
commonly used for tasks that required parallel processing and
responsiveness from multiple ends.
Introduction
Threads
[Link]() vs [Link]() Method
[Link]() Method
Runnable Interface
Quiz: Thread Basics and Lifecycle
Main Thread
Thread Priority in Multithreading
Daemon Thread
Quiz: Thread Methods and Daemon Threads
Java Synchronization
Quiz: Synchronization Basics
Thread Safety
Locks in Java
Lock vs Monitor in Concurrency
Lock Framework vs Thread Synchronization
Reentrant Lock
Deadlock in Multithreading
Thread Pools
Executor Framework
Quiz: Deadlocks and Synchronization
Project: Snake Game
File Handling
Java File Handling enables programs to create, read, write, and
manipulate files stored on the system. It uses classes from the [Link]
and [Link] packages for efficient file operations.
Introduction to Java IO
Reader Class
Writer Class
File Handling
File Class
Quiz: File Handling
FileInputStream
FileOutputStream
FileReader Class
FileWriter Class
FileOutput Stream
BufferedReader Input Stream
BufferedReader Output stream
Fast I/O
Quiz: File Writing
FilePermission Class
FileDescriptor Class
Project: Text Editor
Networking
Java Networking enables communication between devices over a network
using classes from the [Link] package. It supports protocols like TCP
and UDP for building client-server applications and data exchange.
Introduction to Java Networking
Quiz: Networking Basics and Protocols
Socket Programming
Server Socket Class
Quiz: Sockets and Server Communication
URL Class and Methods
Project: Chat Application
Java Database Connectivity(JDBC)
Introduction to Java JDBC
JDBC Driver
JDBC Connection
Types of Statements in JDBC
Quiz: JDBC
Interview Questions
Prepare for Java interviews with these commonly asked questions,
covering core concepts, OOP, collections, multithreading, exception
handling, and frameworks like Spring and Hibernate.
Core Java Interview Questions and Answers
Important Links
Comparison of various programming languages
Companies That Use Java
Careers & Jobs in Java
Practice
Java Exercises – Basic to Advanced Java Practice Programs
Java Coding Practice Problems
Java Language MCQs with Answers
K kartik Follow 439
Article Tags : Java Tutorials
Corporate & Communications
Address:
A-143, 7th Floor, Sovereign Corporate
Tower, Sector- 136, Noida, Uttar
Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante
Apartment, Sector 137, Noida,
Gautam Buddh Nagar, Uttar Pradesh,
201305
Company Explore
About Us POTD
Legal Job-A-Thon
Privacy Policy Connect
Careers Blogs
Contact Us Nation Skill Up
Corporate Solution
Campus Training Program
Tutorials Courses
Programming Languages IBM Certification
DSA DSA and Placements
Web Technology Web Development
AI, ML & Data Science Data Science
DevOps Programming Languages
CS Core Subjects DevOps & Cloud
GATE GATE
School Subjects Trending Technologies
Software and Tools
Offline Centers Preparation Corner
Noida Interview Corner
Bengaluru Aptitude
Pune Puzzles
Hyderabad GfG 160
Patna System Design
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved