Java programs

Let’s learn java program to check palindrome string using recursion. Java program to check palindrome string using recursion To check whether a string is palindrome or not using recursion is the most common java interview question. Recursion means a function calling itself. In the below java program I have created ‘checkPalindrome()’ method with variable String…

Read More Java program to check palindrome string using recursion

Let’s learn java program to check whether string is palindrome using library methods. Java program to check whether string is palindrome using library methods Palindrome string program in java is the common java interview question. Palindrome string is a string which is same even if it is reversed. For example, eye, malayalam, abcba etc., Here’s…

Read More Java program to check whether string is palindrome using library methods

Let’s learn java program to convert decimal number to binary & count number of 1s. Java program to convert decimal number to binary & count number of 1s Java program to convert decimal to binary is the most common java interview question. In java program to convert decimal to binary first user enters an integer…

Read More Java program to convert decimal number to binary & count number of 1s

Let’s learn java program to convert decimal to binary using toBinaryString and stack. Java program to convert decimal to binary using toBinaryString and stack Convert decimal to binary in java is the most common java interview question. There are two ways in converting decimal to binary in java, one using inbuilt function toBinaryString() method of…

Read More Java program to convert decimal to binary using toBinaryString and stack

Let’s learn java program to sort names in an alphabetical order. Java program to sort names in an alphabetical order Sort names in alphabetical order is one of the common java interview question. Now let’s learn java sort string array alphabetically. In the below java program first user enters number of strings using nextInt() method…

Read More Java program to sort names in an alphabetical order

Let’s learn java program to find the largest in three numbers using nested if. Java program to find the largest in three numbers using nested if Find largest of three numbers in java using nested if is the most common java interview question. In the below greatest of three numbers in java using nested if,…

Read More Java program to find the largest in three numbers using nested if

Let’s learn java program to find largest in three numbers using ternary operator. Java program to find largest in three numbers using ternary operator write a program in java to find maximum of three numbers using conditional operator is one of the common interview question. Java ternary operator is an alternative for if-else statement. In…

Read More Java program to find largest in three numbers using ternary operator