Java File Structure
Information in a java program is organized in a specific way. The smallest and simplest java program can only execute if it is coded as a .java file. When a .java file is created, it must contain at least one class. A java class contains specific information such as variables and methods. A single java file is generally [...]
Read MoreIntroduction to Programming
Process of programming The purpose of this e-book to instruct readers on how to conceptualize, design and implement system procedures using programming languages. On this book you will be able to formulate and execute system instructions. To be able to produce sophisticated computer applications such as word processors, [...]
Read MoreJAVA - 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 [...]
Read MoreJAVA – 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 MoreJAVA – 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 MoreJAVA 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