Since the dawn of earth, we have kept on evolving. The need for evaluation comes with the aim of improving the existing systems when something inappropriate is found for the environment. Same is true in the case of programming languages. We need development in programming languages as well. Before discussingContinue Reading

for loop A for loop is used to execute a set of statements for a fixed number of times. It takes the following form: for (initialization; condition; update) { statements; } The for loop defines three types of statements separated with semicolons ( ; ), as follows: Initialization statements TerminationContinue Reading

Structure of Switch Statement // variable_to_test: A varible to test. switch ( variable_to_test ) { case value1: // Do something here … break; case value2: // Do something here … break; default: // Do something here … } The characteristics of switch statement: The switch will check the value of a variableContinue Reading

if statement The if 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.Below is the structure of if statement: if (condition)  {     // Do something here if ‘condition’ is true. } The above imageContinue Reading

What is a Variable? The variable is the basic unit of storage in a program. We define a variable using an identifier, a type, and an optional initializer in Java. In Java, variables must be declared before they can be used. Java allows variables to be initialized dynamically, using anyContinue Reading

In this part of the Java tutorial, we cover some basic programming concepts of the Java language. We begin with some simple programs. We work with variables, constants, and basic data types. We read and write to console and we also mention string formatting. Java simple example We start withContinue Reading

Computer languages, like human languages, have a lexical structure. A source code of a Java program consists of tokens. Tokens are atomic code elements. In Java we have comments, identifiers, literals, operators, separators, and keywords. Java programs are composed of characters from the Unicode character set. Java comments Comments are usedContinue Reading

Java provides many types of operators which can be used according to the need. They are classified based on the functionality they provide. Some of the types are- 1. What Is an Operator? An operator is a symbol that performs a specific kind of operation on one, two, or three operands, andContinue Reading

Overview of data types Any programming language has a set of data types. Data types are basic, and quite similar for all languages. All data types are composed from bits, therefore, I dedicate a post to introduce the history of bits and bytes. My advice is that you should read it before continuing reading this post.Continue Reading

Structure of a Java program A typical Structure of a Java program would contain the following elements: Package declaration Import statements Comments Class definition Class variables, Local variables Methods/Routines/Behaviors The below picture would show the above mentioned elements that make out the structure of Java program. Package Declaration : Classes in java could be placedContinue Reading