Java Programming

System.out.println(“Hi, Java”);

The print statement in Java looks like:- Above statement shows the way to show the output to the user. System System class is one of the core class that provides various useful class fields and methods. It cannot be instantiated. This class also provides facilities regarding standard output, standard input and standard errors. The ‘System’…

Java Programming

Methods of Thread class

Method Description   run () The run() method is a method which contain behavior & entire body of a thread. It is the soul of a thread.       start () It is a method with the help of which run() method is invoked by an object of the related(concerned) thread.Method run()cannot be directly…

C Basic Programs

Swap two numbers using bitwise XOR operator ^

We can swap two numbers using the XOR operator. The result of the bitwise XOR operator is 1 if the corresponding bits of two operands are opposite. It is denoted by ^. To know more about working of XOR, refer to this tutorial: https://youtu.be/zkQuKuITyYo It can also be written as, As the order of evaluation of XOR…