Step by step to learn Simple JAVA Programe
Showing posts with label programming training. Show all posts
Showing posts with label programming training. Show all posts
Saturday, January 7, 2012
Sunday, December 25, 2011
operator in JAVA
An operator is a symbol that tell the computer to perform certain mathematical or logical manipulation.
Java operators are divided into eight categories: assignment, arithmetic, relational, logical, bitwise,
compound assignment, conditional, and type.
Java operators are divided into eight categories: assignment, arithmetic, relational, logical, bitwise,
compound assignment, conditional, and type.
Assignment Operators =
Arithmetic Operators - + * / % ++ -- Relational Operators > < >= <= == !=
Logical Operators && || & | ! ^
Bit wise Operator & | ^ >> >>>
Compound Assignment Operators += -= *= /= %= <<= >>= >>>=
Conditional Operator ?: For more information visit programming-training.com Wednesday, December 21, 2011
Integer Constants in JAVA
An integer constant refers to a sequence of digits.Their are three types of integer
* Decimal Integer
Decimal integer consist of set of digit, 0 through 9. Example of decimal integer constants are: 156 -321 0 45689
Note : Embeded spaces, commas, and non-digit character are not permited between digits.
# Octal Integers
An octal integer constant consist of any combination of any combination of digit from 0 through 7, with a leading 0.Example of octal integer are:038 0 0564 06891
* Hexadecimal integer
A sequence of digit preceeded by 0x or 0x is considered as hexadecimal integer.In that include alphabets A through F or a through f.Example of hexadecimal integer is0x2 0x9F 0xbcd 0x
Example of Java Constant
class IntConstant
{
public static void main(string args[])
{
int i=10;
System.out.println("Integer Contant Values : " +i);
}
}
Output of a Programme
Integer Contant Values : 10
* Decimal Integer
Decimal integer consist of set of digit, 0 through 9. Example of decimal integer constants are: 156 -321 0 45689
Note : Embeded spaces, commas, and non-digit character are not permited between digits.
# Octal Integers
An octal integer constant consist of any combination of any combination of digit from 0 through 7, with a leading 0.Example of octal integer are:038 0 0564 06891
* Hexadecimal integer
A sequence of digit preceeded by 0x or 0x is considered as hexadecimal integer.In that include alphabets A through F or a through f.Example of hexadecimal integer is0x2 0x9F 0xbcd 0x
Example of Java Constant
class IntConstant
{
public static void main(string args[])
{
int i=10;
System.out.println("Integer Contant Values : " +i);
}
}
Output of a Programme
Integer Contant Values : 10
Sunday, December 18, 2011
PHP History
PHP's structure is heavily influenced by the C programming language, a general-purpose language that has existed since 1978 and has been used to develop many large programs, including UNIX and Microsoft Windows. C's popularity led many subsequent languages to use its same general syntax, so that programmers familiar with C would quickly feel comfortable using the new language instead. Other C-based languages include C++, Java, Perl, JavaScript, and C#. Of course, all are fairly distinct languages, but since all of these languages have a similar core, you will find them fairly familiar after seeing PHP.
PHP development is continuing, as those on the PHP team refine the language to enhance its security, to facilitate development of large-scale Web sites, and provide other new features. As of mid-2007, when this was written, the current official version of PHP is version 5, although version 6 is nearing completion. Version 4 is still in wide use, partially because people haven't gotten around to installing the newer versions — but also because established Web sites need to take issues like security and reliability very seriously, and version 4 is a more thoroughly tested software package
Friday, December 16, 2011
History of C++
The history of C++ begins with C. C++ is built upon the foundation of C. Thus, C++ is a superset of C. C++ expanded and enhanced the C language to support object-oriented programming (which is described later in this module). C++ also added several other improvements to the C language, including an extended set of library routines.
C++ was invented by Bjarne Stroustrup in 1979, at Bell Laboratories in Murray Hill, New Jersey. He initially called the new language “C with Classes ” However in 1983 the name was changed to C++ Stroustrup built C++ on the foundation of C including all of C's features attributes and benefits
C++ was invented by Bjarne Stroustrup in 1979, at Bell Laboratories in Murray Hill, New Jersey. He initially called the new language “C with Classes ” However in 1983 the name was changed to C++ Stroustrup built C++ on the foundation of C including all of C's features attributes and benefits
Wednesday, December 14, 2011
Primitive Data Types
The Java programming language is statically-typed, which means that all variables must first be declared before they can be used.
- byte: The
bytedata type is an 8-bit signed two's complement integer. It has a minimum value of -128 and a maximum value of 127 (inclusive). Thebytedata type can be useful for saving memory in large arrays, where the memory savings actually matters. They can also be used in place ofintwhere their limits help to clarify your code; the fact that a variable's range is limited can serve as a form of documentation.
- short: The
shortdata type is a 16-bit signed two's complement integer. It has a minimum value of -32,768 and a maximum value of 32,767 (inclusive). As withbyte, the same guidelines apply: you can use ashortto save memory in large arrays, in situations where the memory savings actually matters.
- int: The
intdata type is a 32-bit signed two's complement integer. It has a minimum value of -2,147,483,648 and a maximum value of 2,147,483,647 (inclusive). For integral values, this data type is generally the default choice unless there is a reason (like the above) to choose something else. This data type will most likely be large enough for the numbers your program will use, but if you need a wider range of values, uselonginstead.
- long: The
longdata type is a 64-bit signed two's complement integer. It has a minimum value of -9,223,372,036,854,775,808 and a maximum value of 9,223,372,036,854,775,807 (inclusive). Use this data type when you need a range of values wider than those provided byint.
- float: The
floatdata type is a single-precision 32-bit IEEE 754 floating point.
- double: The
doubledata type is a double-precision 64-bit IEEE 754 floating point.
- boolean: The
booleandata type has only two possible values:trueandfalse. Use this data type for simple flags that track true/false conditions. This data type represents one bit of information, but its "size" isn't something that's precisely defined.
- char: The
chardata type is a single 16-bit Unicode character. It has a minimum value of'\u0000'(or 0) and a maximum value of'\uffff'(or 65,535 inclusive).
Variable in JAVA
Subscribe to:
Posts (Atom)