Java-Bitwise NOT

Bitwise NOT( ~ ) The Bitwise NOT is represented by the symbol (~) . Bitwise NOT is an unary operator and inverts all the bits represented by its operand. That is, 0s become 1s and 1s become zero. Program Program Source public class Javaapp { public static void main(String[] args) { byte a = 3; byte b = … Read more…

Java-Bitwise Exclusive OR

Bitwise Exclusive OR( ^ ) The bitwise exclusive OR is represented by the symbol (^). The result of exclusive OR is 1 if only one bits of the bits is 1; otherwise it is zero. Program Program Source public class Javaapp { public static void main(String[] args) { int a = 10; int b = 12; int … Read more…

Java-Bitwise OR

Bitwise OR( | ) The Bitwise OR, is represented by the symbol | (vertical bar) and is surrounded by two integer operands. The result of OR operation is 1 if at least one of the bits has a value 1; otherwise it is zero. Program Program Source public class Javaapp { public static void main(String[] … Read more…

Java-String Concatenation

String Concatenation To join two String objects to form a new, single string you use the + operator, just as you have been doing with the argument to the println() method in the program example thus far. Program Program Source class Javaapp { public static void main(String[] args) { System.out.println(“hajsof”+”java”+”tutorial”); } }