Java xor operator with example programs

Java+bitwise+XOR+operator

Java Bitwise XOR operator: In Java, you can use the ^ operator to perform a bitwise exclusive or (XOR) operation on two integers. The XOR operation compares each... read more ?

How to get first two characters of a string in java

GetFirstTwocharactersString+Java

We can get first  two character of a string in java by using subString() method in java To get first N numbers of a string s.substring(0,n); Lets see... read more ?

How to check if a character is a special character in java

CheckSpecialCharacterStringjava

To check if string contains special character or not or  check whether first character is special character or not we can use regex or contains method of sting... read more ?

How to check if first character of a string is a number or not in java

Checkfirstcharacterstringnumber

To check if first character of a string is a number or not in java we can check in multiple ways. By using Character.isDigit() method by passing character... read more ?

Java program to Get current date and time

get+current+date+and+time+java

By using date and calendar classes we can get current date and time in java. By using SimpleDateFormat we can convert date into string format. Create object of... read more ?

Java program to find maximum of two numbers using Math.max()

math+max

We can find maximum of two numbers by using if condition check. In java.lang.Math class also having a method Math.max() which will take two numbers and returns maximum... read more ?

Find power using math.pow() in java

math+pow

java.lang.Math.pow() method used to find the power of numbers. It is a static method define in Math class so that we can call directly using classname. Math.pow(); It... read more ?

Select Menu