Java Tutorials
241. Relational Operators in Java
By: Jagan : 2007-09-07
Description: The relational operators determine the relationship that one operand has to the other. Specifically, they determine equality and ordering. The relational operators are shown here:
242. left shift operator, <<, in Java
By: Emiley J : 2007-09-07
Description: The left shift operator, <<, shifts all of the bits in a value to the left a specified number of times. It has this general form:
243. Bitwise logical operators in Java
By: Baski : 2007-09-07
Description: The bitwise logical operators are &, |, ^, and ~. The following table shows the outcome of each operation. In the discussion that follows, keep in mind that the bitwise operators are applied to each individual bit within each operand.
244. Bitwise operators in Java
By: Baski : 2007-09-07
Description: Java defines several bitwise operators which can be applied to the integer types, long, int, short, char, and byte. These operators act upon the individual bits of their operands. They are summarized in the table below:
245. Multidimensional or arrays of arrays in Java
By: Abinaya : 2007-09-07
Description: In Java, multidimensional arrays are actually arrays of arrays. These, as you might expect, look and act like regular multidimensional arrays. However, as you will see, there are a couple of subtle differences. To declare a multidimensional array variable, specify each additional index using another set of square brackets. For example, the following declares a two-dimensional array variable called twoD.
246. Using One-Dimensional Arrays in Java
By: Abinaya : 2007-09-07
Description: A one-dimensional array is, essentially, a list of like-typed variables. To create an array, you first must create an array variable of the desired type. The general form of a one-dimensional array declaration is
247. how to use boolean data type in Java
By: Lakshmi : 2007-09-07
Description: Java has a simple type, called boolean, for logical values. It can have only one of two possible values, true or false. This is the type returned by all relational operators, such as a < b. boolean is also the type required by the conditional expressions that govern the control statements such as if and for.
248. char data type in Java
By: Jagan : 2007-09-07
Description: In Java, the data type used to store characters is char. However, C/C++ programmers beware: char in Java is not the same as char in C or C++. In C/C++, char is an integer type that is 8 bits wide. This is not the case in Java. Instead, Java uses Unicode to represent characters. Unicode defines a fully international character set that can represent all of the characters found in all human languages. It is a unification of dozens of character sets, such as Latin, Greek, Arabic, Cyrillic, Hebrew, Katakana, Hangul, and many more. For this purpose, it requires 16 bits. Thus, in Java char is a 16-bit type. The
249. float vs double data types in Java
By: Baski : 2007-09-07
Description: Floating-point numbers, also known as real numbers, are used when evaluating expressions that require fractional precision. For example, calculations such as square root, or transcendentals such as sine and cosine, result in a value whose precision requires a floating-point type. Java implements the standard (IEEE-754) set of floating point types and operators. There are two kinds of floating-point types, float and double, which represent single- and double-precision numbers, respectively. Their width and ranges are shown here:
250. Integer: byte, short, int, and long data types in Java
By: Abinaya : 2007-09-07
Description: Java defines four integer types: byte, short, int, and long. All of these are signed, positive and negative values. Java does not support unsigned, positive-only integers. Many other computer languages, including C/C++, support both signed and unsigned integers. However, Java's designers felt that unsigned integers were unnecessary.