Java Program For Arithmetic Operators

Get Job-ready: Java Course with 45+ Real-time Projects! - Learn Java

Program 1

class TestData1
{
  public static void main(String args[])
 {
    byte a=50,b=30;
    System.out.println("Before swaping" + a + " " +b); 
      a=(byte)(a+b);
      b=(byte)(a-b);
      a=(byte)(a-b);

    System.out.println("After swaping" + a + " " +b);    


 }
}

 

You give me 15 seconds I promise you best tutorials
Please share your happy experience on Google

courses

TechVidvan Team

TechVidvan Team provides high-quality content & courses on AI, ML, Data Science, Data Engineering, Data Analytics, programming, Python, DSA, Android, Flutter, full stack web dev, MERN, and many latest technology.

Leave a Reply

Your email address will not be published. Required fields are marked *