
Already know some of this? A 2-minute test skips the lessons you know.
Take the placement testA free 11-lesson course built from GeeksforGeeks's 2h 43m of YouTube video. 2 days at 90 minutes a day, with study notes and a quiz in every lesson. A 2-minute placement test skips what you already know.
Taught by GeeksforGeeks on YouTube. Videos play in YouTube's own player, so the creator keeps every view.
Write a Java program using the modulus operator (%) and if-else to determine if a positive integer is even or odd.
Implement a program to print the absolute value of an integer using if-else to handle negative inputs.
Determine if a real number (double) has no fractional part by comparing it with its integer cast, using if-else logic.
Take cost price and selling price as input; use if-else-if ladder to print profit, loss, or neither, including the amount.
Combine two conditions (n > 999 && n < 10000) using logical AND (&&) in an if statement to verify a four-digit number.
Use an else-if ladder with priority ordering to print exclusive messages for divisibility by 5, 3, both, or neither.
Input three sides and use logical AND (&&) across three conditions to check triangle inequality theorem.
Solve 'greatest of three numbers' using nested if-else: compare A vs B, then winner vs C, handling equal values correctly.
Refine the greatest-of-three solution using nested if-else with >= to correctly handle equal numbers and avoid duplicate prints.
Learn the ternary operator syntax (condition ? trueVal : falseVal) for concise value assignment and printing, and its limitation with void statements in Java.
Apply ternary operator to nested logic (greatest of three) and variable assignment based on input sign, understanding its expression-based nature.