Tuesday, 27 October 2015

Java Tutorial : Java Arithmetic Operators


Click here to watch in Youtube :
https://www.youtube.com/watch?v=SRtVvkFGXaA&list=UUhwKlOVR041tngjerWxVccw

Click the below Image to Enlarge
Java Tutorial : Java Arithmetic Operators 
ArithmeticDemo.java
class ArithmeticDemo
{

    public static void main(String[] args)
    {

        int addedValue = 1 + 2;
        System.out.println("1 + 2 = " + addedValue);

        int subtractedValue = 2 - 1;
        System.out.println("2 - 1 = " + subtractedValue);

        int multipliedValue = 2 * 2;
        System.out.println("2 * 2 = " + multipliedValue);

        int diviedValue = 4 / 2;
        System.out.println("4 / 2 = " + diviedValue);

        int remainderValue = 5 % 2;
        System.out.println("5 % 2 = " + remainderValue);
        
        String firstString = "Hi";
        String secondString = " Welcome John.";
        String thirdString = firstString+secondString;
        System.out.println(thirdString);
        

    }
}
Output
1 + 2 = 3
2 - 1 = 1
2 * 2 = 4
4 / 2 = 2
5 % 2 = 1
Hi Welcome John.
To Download OperatorsDemoArithmeticApp Project Click the below link
https://sites.google.com/site/javaee4321/java/OperatorsDemoArithmeticApp.zip?attredirects=0&d=1

See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • All JAVA EE Links
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java Collection Framework Tutorial
  • JAVA Tutorial
  • No comments:

    Post a Comment

    Google+ Followers

    Google+ Badge