Java Practice Questions for Java Candidates
Logical coding questions are designed to evaluate a candidate’s ability to write clean code, understand core Java concepts, and apply logical reasoning to solve problems. These questions help interviewers assess the candidate’s skills in variables, operators, loops, conditionals, arrays, strings, functions, and basic algorithms.
Below is an organized overview of the most commonly asked logical coding questions for beginners to intermediate Java candidates.
Basic Program
- Print Hello world.
- Addition/Subtraction/Multiplication/Division of two numbers.
- Find area of circle/Rectangle/Square.
- Find a Square and cube of number.
- Take input from user and display your full name, age, college name, address.
- Read and print an integer value in java.
- Take input from user and find Addition/Subtraction/Multiplication/Division of two numbers.
- Take input from user and find Square and cube of number.
- Find greatest between two numbers using if else statement
- Find lowest between two numbers using if else statement
- Fibonacci Series.
- Armstrong Number.
- Perfect number.
- Prime number.
- Prime number in range.
- Factorial of a number.
- Reverse a string.
- Reverse a String With out using Built-in Function
- Reverse a number.
- Palindrome number
- Palindrome string.
- Find duplicate characters in a string.
- Find frequency of duplicate character in a String.
- Find frequency of each character in a string .
- Remove duplicate characters in a String
- Find Second highest number.
- Find min and max in array .
- Find sum of digit of an integer .
- Reverse of an array.
- Swap two number without temp.
- Remove white space from string.
- Binary search.
- Shorting a number in ascending order.
- Second largest using for loop shorting.
- find the sum of all the numbers in an array.
- Find square of an array.
- Find cube of an array.
- Addition of two array.
- Addition, subtraction, multiplication of array.
- Perform Linear search on array.
- Make an array and find second largest value.
- Addition of 2D array.
- Transpose of an array.
- Program to Count the Number of Digits in a Number.
- to check if two strings are anagrams.
- program to check if a vowel is present in a string.
- How To Find Duplicates Element in Array in Java.
- How To remove Duplicates element In Array in Java.
- reverse each word of a string in Java.
- read sentence by user then find out number of word in sentence.
- count the total number of characters in a string.
- count the total number of vowels and consonants in a string.
- find the duplicate words in a string.
- Remove white space from string
Inharitance
- Write a programm to demostrate Single Inharitance in java?
- Write a programm to demostrate Multilevel Inharitance in java?
- Write a programm to demostrate Hierarchical Inharitance in java?
.png)