Java Practical Exam Revision Sheet
• Difference between print() and println()
print() displays output on the same line without moving to the next line. println() prints and then moves the cursor to a ne
• Arithmetic Operators
Used to perform mathematical operations: +, -, *, /, %. They work on numeric data types like int or float.
• Factorial
Factorial of a number is the product of all positive integers up to that number. Example: 5! = 120. Calculated using loops
• Fibonacci Series
Series where each number is the sum of previous two numbers. Starts from 0, 1 then 1, 2, 3, 5, 8, etc.
• Palindrome String
A string that reads the same backward and forward, e.g., 'madam'. Checked by reversing and comparing strings.
• Constructor and Its Types
Special method used to initialize objects. Same name as class and no return type. Types: default, parameterized, and c
• Method Overriding
Subclass redefines a parent class method with the same name and parameters. Used for runtime polymorphism.
• Method Overloading
Multiple methods with same name but different parameters. Used for compile-time polymorphism.
• Inheritance
Allows one class to acquire another's properties using 'extends'. Promotes code reuse and reduces redundancy.
• Abstract Class and Abstract Method
Abstract class uses 'abstract' keyword, can have abstract and non-abstract methods. Abstract method has no body and
• Interface
A collection of abstract methods and constants. Used to achieve full abstraction and multiple inheritance in Java.
• Built-in Exception
Predefined exceptions in Java such as ArithmeticException, NullPointerException, and ArrayIndexOutOfBoundsExcepti
• User-defined Exception
Custom exception created by extending Exception class. Used for specific error handling.
• Thread
A lightweight process for multitasking. Created by extending Thread or implementing Runnable.
• Collection Framework of Array
Provides dynamic data structures like ArrayList, HashSet. More flexible than arrays and supports dynamic resizing.
• Swing
Used for building GUI applications with components like JFrame, JButton, JLabel. Part of [Link] package.
• Servlet
Server-side Java program that handles web requests and generates dynamic content. Part of [Link] package.
• JSP (Java Server Pages)
Technology for creating dynamic web pages using Java inside HTML. Simpler to write and maintain than servlets.