Learning Java – (Video 3) Tutorial Series – Operators

This is third video in the series of Learning Java, this video is for Learning Java Operators Example – basics about operators and usage explained.

If you feel this video is useful, Please share it with your friends on Facebook, twitter Google plus etc.

Code developed in this tutorial provided below:

public class HelloWorld {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		learnOperators();	
	}
	
	public static void learnOperators(){
		
		int a = 10;
		int b = 5;
		
		// Lets add two numbers a and b
		int sum = a + b;
		System.out.println("Value of sum ="+sum);

		// Lets use subtraction operator
		int sub = a - b;
		System.out.println("Value of sub = "+sub);
		
		int division = a / b;
		System.out.println("Value of division = "+division);
		
		int multi = a * b;
		System.out.print("Value of multiplication ="+multi);
		
	}
	
}

 
For further reading refer Java Programming Category posts.

Learning Java Operators Example
Tagged on:     

Leave a Reply

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