Java Basics
JAVA – Control Statements

As you’ve learned in the sequential statements topic, the computer while running a java program, starts executing from the topmost line of the code. It reads the first line of the code, and continues doing so till the last line. Control statements help you run a program in a manner you define. These statements are [...]

Read More
Posted on 26th August 2010No Comments
JAVA – Console Input

Console input refers to keyboard. Most of the times we assign value s to the variables while declaring them. However, there are times when the program depends on the user provided inputs also. For example: String your_name_example; your_name_example  = Console.ReadLine(); In this example, first statement declares a string variable ` your_name_example ‘. Next statement, the [...]

Read More
Posted on 8th July 2010No Comments
JAVA – Console Output Commands

Just as the Console Input command, accepts the user defined input, the Console. Output command displays the output on the monitor. In the Java programming language, you can write programs that write text lines to the console, which is a DOS based command window. Though it’s not as popular as a Graphical User Interface or [...]

Read More
Posted on 11th May 2010No Comments
JAVA Expressions

Let’s first look at expressions. An expression is a program construct defined according to the syntax of the programming language, which uses variables, operators, and methods. Let’s now look at some examples of expressions: int category_var = 0; cat_Array[0]=200; Now you can use these variables in the following expression: System.out.println(“An element 1 at index 0: [...]

Read More
Posted on 15th April 2010No Comments
Sequential Statements in JAVA

A program is defined as a group of statements executed in a given order to achieve a predetermined result.  Therefore, a program executes the statements in a sequential manner, either from top to bottom or vice versa. These are executed in the manner that they appear in the program code, called the sequential execution or [...]

Read More
Posted on 12th April 2010No Comments
JAVA – Different type of Statements

A statement is a command given by the programmer to the computer program. Statements are used by different computer programming languages, such as Java, C, and C++. The syntax for declaring and using statements varies in each language. A simple example of a statement can be: println “Hello ! I hope you are enjoying your [...]

Read More
Posted on 6th April 2010No Comments
JAVA – Logical /Boolean Operator

The relational operators work well in conditions where only a single condition needs to be checked. Logical operators either return a True value or a False value based on the state of the Variables. The six logical or Boolean, operators used in the Java programming language are: AND conditional AND OR conditional OR exclusive OR [...]

Read More
Posted on 26th March 2010No Comments
JAVA – Relational Operators

The relational operators are used to determine if one operand is equal to, greater than, less than, or not equal to the other operand with which it is compared. Just like mathematical operators, most of these operators are just like the normal operators we use in the everyday life. But certain operators are used in [...]

Read More
Posted on 22nd March 2010No Comments
JAVA – Arithmetic Operators

The Java programming language provides operators that perform simple mathematical operations such as addition, subtraction, multiplication, and division. These operators resemble the basic mathematics symbols that we all are aware of. Unlike the normal mathematical symbols, the “%”operator divides one operand by another and returns a remainder in the result. The Java programming languages uses [...]

Read More
Posted on 14th March 2010No Comments
Operators in Java

Computer operators are special symbols that perform specific operations on operands to return a result. Most computer programming languages support pre-defined set of operators, similar in function to mathematical operators. Many a times, these operators are built-into a programming language, while at other times these may be defined in the program itself.  Therefore, languages such [...]

Read More
Posted on 3rd January 2010No Comments