• Saves Valuable Time
  • Trusted Accuracy for 12 Years
  • 15-Day Money-Back Guarantee

Java and VB Operator Comparison

VB.NET Java
+, -, *, >, >=, <, <=, <<, >>
&    (string concatenation)
()    (indexing)
CInt(CUInt(x) >> y)
And
Or
AndAlso
OrElse
Not
Xor
Mod
x ^ y
=
Is
IsNot
<>

If(x, y, z)
If(x, y)

x / y    (where x and y are integers)
x / y    (where x and y are doubles)
x \ y    (where x and y are integers)

x \ y    (where x and y are doubles)
unchanged
+    (string concatenation)
[]
x >>> y
&
|
&&
||
! or ~    (depending on context)
^
%
Math.pow(x, y)    (no exponentiation operator)
= or ==    (depending on context)
==
!=
!=

x ? y : z
x != null ? x : y

x / (double)y
x / y
x / y

use VB to Java Converter to view the helper class


Use VB to Java Converter to convert from VB to Java.     

Additional resource: VB.NET and Java Equivalents


Copyright © 1997 – 2017 Tangible Software Solutions Inc.