Program to Check whether Character is Alphabet or Not

In this article we are going to write java program to check whether character entered by user is alphabet or not. Java code to check if character is alphabet or not Output if character is alphabet Output if character is not alphabet

Valid Parentheses Program in Java

in this article we are going to Write the program of checking valid Parentheses in java Valid Parentheses Solution validParentheses.java package gangforcode; import java.util.Stack; public class validParentheses { public static Boolean validParentheseCheck(String x) { if(x.length()<=1){ return false; } Stack<Character> stk= new Stack<>(); for(int i=0;i<x.length();i++){ if(x.charAt(i)=='[‘ || x.charAt(i)=='{‘ || x.charAt(i)=='(‘){ stk.push(x.charAt(i)); } if(stk.isEmpty()) return false; if(!stk.isEmpty()) … Read more

find one extra character in string

In this article, we are going to find one extra character in given two strings. Problem:- we have two strings s1 and s2 of length n and n+1. we need to find that one extra character in string s2 that is not present in string s1. Java code to find one extra character in given … Read more

binary to decimal

In this article, we are going to see how we can convert binary to decimal. We also write java code to convert binary to decimal. Binary to Decimal conversion:- Steps:- Java code to convert binary to decimal:- Output:- The same logic can be used to convert binary to decimal in other programing languages like C, … Read more

decimal to binary

In this article we are going to see how we can convert decimal to binary. We also write java code to convert decimal to binary. Decimal to Binary conversion:- For conversion of Decimal to Binary continuously divide the decimal number by 2 until decimal number become 0. and add every reminder after division at the … Read more

string palindrome in java

In this article, we are going to discuss about palindrome string and write a code in java to check whether a given string is palindrome or not. Palindrome String:- A palindrome string is a string that remains the same after reversing the string for example-“abc”, this is not a palindrome string because after reversing the … Read more