Java Interview Questions
Classic Java interview programs, traced line by line with the reasoning behind each step.
Coding Problems
- Reversing a String in Java: Learn a fundamental Java technique: reversing a string. This example uses a for loop to build the reversed string character by character.
- Swap Two Numbers Without a Third Variable: Learn a classic programming trick to swap the values of two integer variables without using a temporary variable. This lesson explores the arithmetic approach.
- Checking for Vowels in a String: Learn how to iterate through a string and use conditional logic to check for the presence of vowels.
- Prime Number Check: Learn how to write a Java program to determine if a given number is a prime number using loops and conditional logic.