Opening Hours :7AM to 9PM
class Main
{
public static void main(String args[])
{
int x=10;
System.out.println("The Sign value is "+(-x));
}
}
class Main
{
public static void main(String args[])
{
int x;
x=Integer.parseInt(args[0]);
System.out.println("The Sign value is "+(-x));
}
}
import java.util.*;
class Main
{
public static void main(String args[])
{
int x;
Scanner s=new Scanner(System.in);
System.out.println("Enter x Value");
x=s.nextInt();
System.out.println("The Sign value is "+(-x));
}
}
class Main
{
public static void main(String args[])
{
int x=10;
System.out.println("The PreIncrement value is "+(++x));
}
}
class Main
{
public static void main(String args[])
{
int x;
x=Integer.parseInt(args[0]);
System.out.println("The PreIncrement value is "+(++x));
}
}
import java.util.*;
class Main
{
public static void main(String args[])
{
int x;
Scanner s=new Scanner(System.in);
System.out.println("Enter x Value");
x=s.nextInt();
System.out.println("The PreIncrement value is "+(++x));
}
}
class Main
{
public static void main(String args[])
{
int x=10;
System.out.println("The PostIncrement value is "+(x++));
}
}
class Main
{
public static void main(String args[])
{
int x;
x=Integer.parseInt(args[0]);
System.out.println("The PostIncrement value is "+(x++));
}
}
import java.util.*;
class Main
{
public static void main(String args[])
{
int x;
Scanner s=new Scanner(System.in);
System.out.println("Enter x Value");
x=s.nextInt();
System.out.println("The PostIncrement value is "+(x++));
}
}
class Main
{
public static void main(String args[])
{
int x=10;
System.out.println("The PreDecrement value is "+(--x));
}
}
class Main
{
public static void main(String args[])
{
int x;
x=Integer.parseInt(args[0]);
System.out.println("The PreDecrement value is "+(--x));
}
}
import java.util.*;
class Main
{
public static void main(String args[])
{
int x;
Scanner s=new Scanner(System.in);
System.out.println("Enter x Value");
x=s.nextInt();
System.out.println("The PreDecrement value is "+(--x));
}
}
class Main
{
public static void main(String args[])
{
int x=10;
System.out.println("The PostDecrementvalue is "+(x--));
}
}
class Main
{
public static void main(String args[])
{
int x;
x=Integer.parseInt(args[0]);
System.out.println("The PostDecrement value is "+(x--));
}
}
import java.util.*;
class Main
{
public static void main(String args[])
{
int x;
Scanner s=new Scanner(System.in);
System.out.println("Enter x Value");
x=s.nextInt();
System.out.println("The PostDecrement value is "+(x--);
}
}
Operator | Operation | Example |
---|---|---|
+ | Addition | x+y |
- | Substraction | x-y |
* | Multiplication | x*y |
/ | Division | x/y |
% | Modular Division | x%y |
class Main
{
public static void main(String args[])
{
int x=10,y=20,z;
z=x+y;
System.out.println("Addition is "+(z));
}
}
class Main
{
public static void main(String args[])
{
int x,y,z;
x=Integer.parseInt(args[0]);
y=Integer.parseInt(args[1]);
z=x+y;
System.out.println("Addition is "+(z));
}
}
import java.util.*;
class Main
{
public static void main(String args[])
{
int x,y,z;
Scanner s=new Scanner(System.in);
System.out.println("Enter x,y values");
x=s.nextInt();
y=s.nextInt();
z=x+y;
System.out.println("Addition is "+(z));
}
}
Operator | Example | Same As |
---|---|---|
= | x=y | x=y | += | x+=y | x=x+y |
-= | x-=y | x=x-y |
*= | x*=y | x=x*y |
/= | x/=y | x=x/y |
%= | x%=y | x=x%y |
class Main
{
public static void main(String args[])
{
int x=10,y=20,z;
z=x;
x=y;
y=z;
System.out.println("x value is: "+(x));
System.out.println("y value is: "+(y));
}
}
class Main
{
public static void main(String args[])
{
int x,y,z;
x=Integer.parseInt(args[0]);
y=Integer.parseInt(args[1]);
z=x;
x=y;
y=z;
System.out.println("x value is: "+(x));
System.out.println("y value is: "+(y));
}
}
import java.util.*;
class Main
{
public static void main(String args[])
{
int x,y,z;
Scanner s=new Scanner(System.in);
System.out.println("ENter x,y values");
x=s.nextInt();
y=s.nextInt();
z=x;
x=y;
y=z;
System.out.println("x value is: "+(x));
System.out.println("y value is: "+(y));
}
}
class Main
{
public static void main(String args[])
{
int x=10,y=20;
x=x+y;
y=x-y;
x=x-y;
System.out.println("x value is: "+(x));
System.out.println("y value is: "+(y));
}
}
class Main
{
public static void main(String args[])
{
int x,y,z;
x=Integer.parseInt(args[0]);
y=Integer.parseInt(args[1]);
x=x+y;
y=x-y;
x=x-y;
System.out.println("x value is: "+(x));
System.out.println("y value is: "+(y));
}
}
import java.util.*;
class Main
{
public static void main(String args[])
{
int x,y,z;
Scanner s=new Scanner(System.in);
System.out.println("Enter x,y values");
x=s.nextInt();
y=s.nextInt();
x=x+y;
y=x-y;
x=x-y;
System.out.println("x value is: "+(x));
System.out.println("y value is: "+(y));
}
}
Operator | Example |
---|---|
== | x==y | < | x<y |
> | x>y |
<= | x<=y |
>= | x>=y |
!= | x!=y |
class Main
{
public static void main(String args[])
{
int x=10,y=20;
boolean z;
z=x>y;
System.out.println("z value is: "+(z));
}
}
class Main
{
public static void main(String args[])
{
int x,y;
boolean z;
x=Integer.parseInt(args[0]);
y=Integer.parseInt(args[1]);
z=x>y;
System.out.println("z value is: "+(z));
}
}
import java.util.*;
class Main
{
public static void main(String args[])
{
int x,y;
boolean z;
Scanner s=new Scanner(System.in);
System.out.println("Enter x,y values");
x=s.nextInt();
y=s.nextInt();
z=x>y;
System.out.println("z value is: "+(z));
}
}
Operator | Example |
---|---|
&& | x>y && x>z | || | x>y || x>z |
! | !(x>y && x>z) !(x>y || x>z) !(x>y) && !(x>z) !(x>y) || !(x>z) |
class Main
{
public static void main(String args[])
{
int x=10,y=20,z=30
boolean p;
p=x>y && x>z;
System.out.println("p value is: "+(p));
}
}
class Main
{
public static void main(String args[])
{
int x,y,z;
boolean p;
x=Integer.parseInt(args[0]);
y=Integer.parseInt(args[1]);
z=Integer.parseInt(args[2]);
p=x>y && x>z;
System.out.println("p value is: "+(p));
}
}
import java.util.*;
class Main
{
public static void main(String args[])
{
int x,y,z;
boolean p;
Scanner s=new Scanner(System.in);
System.out.println("Enter x,y,z values");
x=s.nextInt();
y=s.nextInt();
z=s.nextInt();
p=x>y && x>z;
System.out.println("p value is: "+(p));
}
}
Operator | Operation | Example |
---|---|---|
& | AND | x&y |
| | OR | x|y |
^ | CAP | x ^ y |
~ | NAGETION | ~x |
<< | LEFT SHIFT | x<<y |
>> | RIGHT SHIFT | x>>y |
class Main
{
public static void main(String args[])
{
int x=10,y=15,z
z=x & y;
System.out.println("z value is: "+(z));
}
}
class Main
{
public static void main(String args[])
{
int x,y,z;
x=Integer.parseInt(args[0]);
y=Integer.parseInt(args[1]);
z=x & y;
System.out.println("z value is: "+(z));
}
}
import java.util.*;
class Main
{
public static void main(String args[])
{
int x,y,z;
Scanner s=new Scanner(System.in);
System.out.println("Enter x,y values");
x=s.nextInt();
y=s.nextInt();
z=x & y;
System.out.println("z value is: "+(z));
}
}
class Main
{
public static void main(String args[])
{
int x=10,y=15,z;
z=x | y;
System.out.println("z value is: "+(z));
}
}
class Main
{
public static void main(String args[])
{
int x=10,y=15,z;
z=x ^ y;
System.out.println("z value is: "+(z));
}
}
class Main
{
public static void main(String args[])
{
int x=10;
z= ~x;
System.out.println("z value is: "+(z));
}
}
class Main
{
public static void main(String args[])
{
int x=10;
z=x << 2;
System.out.println("z value is: "+(z));
}
}
class Main
{
public static void main(String args[])
{
int x=10;
z=x >> 2;
System.out.println("z value is: "+(z));
}
}
Expression1 ? Expression2 : Expression3;
class Main
{
public static void main(String args[])
{
int x=10;
String s = x%2==0 ? "EvenNumber" : "OddNumber";
System.out.println(s);
}
}
class Main
{
public static void main(String args[])
{
int x;
x=Integer.parseInt(args[0]);
String s;
s= x%2==0 ? "EvenNumber" : "OddNumber";
System.out.println(s);
}
}
import java.util.*;
class Main
{
public static void main(String args[])
{
int x;
Scanner s1=new Scanner(System.in);
System.out.println("Enter x value");
x=s1.nextInt();
String s;
s= x%2==0 ? "EvenNumber" : "OddNumber";
System.out.println(s);
}
}
class Main
{
public static void main(String args[])
{
int x=10,y=20;
String s;
s= x>y ? "x is Max" : "y is Max";
System.out.println(s);
}
}
class Main
{
public static void main(String args[])
{
int x,y;
x=Integer.parseInt(args[0]);
y=Integer.parseInt(args[1]);
String s;
s= x>y ? "x is Max" : "y is Max";
System.out.println(s);
}
}
import java.util.*;
class Main
{
public static void main(String args[])
{
int x,y;
Scanner s1=new Scanner(System.in);
System.out.println("Enter x ,y value");
x=s1.nextInt();
y=s1.nextInt();
String s;
s= x>y ? "x is Max" : "y is Max";
System.out.println(s);
}
}
class Main
{
public static void main(String args[])
{
int x=10,y=20,z=30
String s;
s=(x > y) ?
(x > z ? "x is Max" : "z is Max") :(y > z ? "y is Max" : "z is Max");
System.out.println(s);
}
}
class Main
{
public static void main(String args[])
{
int x,y,z;
x=Integer.parseInt(args[0]);
y=Integer.parseInt(args[1]);
z=Integer.parseInt(args[2]);
String s;
s=(x > y) ?
(x > z ? "x is Max" : "z is Max") :(y > z ? "y is Max" : "z is Max");
System.out.println(s);
}
}
import java.util.*;
class Main
{
public static void main(String args[])
{
int x,y,z;
Scanner s1=new Scanner(System.in);
System.out.println("Enter x ,y ,z value");
x=s1.nextInt();
y=s1.nextInt();
z=s1.nextInt();
String s;
s=(x > y) ?
(x > z ? "x is Max" : "z is Max") :(y > z ? "y is Max" : "z is Max");
System.out.println(s);
}
}
class Main
{
public static void main(String args[])
{
int a=2000,d=2,i=2,si;
si= (a*d*i)/100;
System.out.println("Simple Interest is: "+(si));
}
}
class Main
{
public static void main(String args[])
{
int a,d,i,si;
a=Integer.parseInt(args[0]);
d=Integer.parseInt(args[1]);
i=Integer.parseInt(args[2]);
si= (a*d*i)/100;
System.out.println("Simple Interest is: "+(si));
}
}
import java.util.*;
class Main
{
public static void main(String args[])
{
int a,d,i,si;
Scanner s=new Scanner(System.in);
System.out.println("Enter Amount:");
a=s.nextInt();
System.out.println("Enter Duration:");
d=s.nextInt();
System.out.println("Enter Interest:");
i=s.nextInt();
si= (a*d*i)/100;
System.out.println("Simple Interest is: "+(si));
}
}