Friday , December 13 2019

Monthly Archives: September 2015

JAVA #11 – Conditional Statements and Switch Cases

Conditional Statements in Java A conditional statement is an expression that produces a true or false result. You can use that result as you see fit. To create the expression, you use the Boolean operators we studied in the previous lesson. In the previous lesson, we saw only how to …

Read More »

JAVA # 10 – While Loop and Do-While Loop in Java

The while and do-while Statements The while statement continually executes a block of statements while a particular condition is true. Its syntax can be expressed as: while (expression) { statement(s) } The while statement evaluates expression, which must return a boolean value. If the expression evaluates to true, the while statement executes the statement(s) in the while block. The while statement continues testing the expression and …

Read More »

JAVA #09 – For Loop in Java

The for Statement The for statement provides a compact way to iterate over a range of values. Programmers often refer to it as the “for loop” because of the way in which it repeatedly loops until a particular condition is satisfied. The general form of the forstatement can be expressed as follows: for …

Read More »

JAVA #08 – Introduction of Loops in Java

  Loop: In computer programming, a loop is a sequence of instruction s that is continually repeated until a certain condition is reached. Java programming language provides the following types of loop to handle looping requirements. Click the following links to check their detail. Loop Type Description while loop Repeats a statement or …

Read More »

JAVA #07 – Scanner Class in Java

Scanner class: The Scanner class is a class in java.util, which allows the user to read values of various types. There are far more methods in class Scanner than you will need in this course. We only cover a small useful subset, ones that allow us to read in numeric values from either …

Read More »

JAVA #06 – Operators in Java

  Java provides a rich set of operators to manipulate variables. We can divide all the Java operators into the following groups: Arithmetic Operators Relational Operators Logical Operators Assignment Operators Increment/Decrement Operators  

Read More »

JAVA #05 – Variables in Java

What are variables? A temporary holding area of memory in which data can be store (also called operand). Variables in Java behave the same way like most of other object oriented programming languages. Local variables Local variables are declared in methods, constructors, or blocks. Local variables are created when the …

Read More »