Associativity of operations in Java

package com.company;
import java.util.Scanner;

public class tuts {
public static void main(String[] args) {
int x= 10;
int y = 4 ;
int a = 1 ;
int b = 2 ;
int c = 3 ;
int v = 4 ;
int u = 5 ;
int d = 6 ;

//Quick Quiz

// int v = x/y*2;
// int v = b*b - (4*a*c)/(2*a) ;
// int v1 = (v*v) - (u*u);
int v1 = (a * b) - d;


System.out.println(v1);


}
}

Comments

Popular posts from this blog

Creating a Thread by Extending Thread class

Constructors from Thread class in Java