Friday , December 13 2019

Java

JAVA #14 – Dynamic user input on Array in Java (Console)

  Dynamic user input on Array in Java One of the strengths of Java is the huge libraries of code available to you. This is code that has been written to do specific jobs. All you need to do is to reference which library you want to use, and then …

Read More »

JAVA #13 – Arrays in Java

Arrays An array is a container object that holds a fixed number of values of a single type. The length of an array is established when the array is created. After creation, its length is fixed. You have seen an example of arrays already, in the main method of the “Hello World!” application. This …

Read More »

JAVA #12 – If,else-if,else and Ternary Operators in Java

The if-then and if-then-else Statements The if-then Statement The if-then statement is the most basic of all the control flow statements. It tells your program to execute a certain section of code only if a particular test evaluates to true. Syntax of if-else and if-else statement: if (condition) { statements …

Read More »

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 »