.

Alex

File Input and Output in Java

Introduction to File Input and Output Data stored in variables and arrays is temporary — it’s lost when the program terminates. Java allows a program to read data from a file or write data to a file. Once the data is saved in a file on computer disk, it will remain there after the program…

Read More

Operator Precedence

Consider the following statement: X = 5 + 30 * 10 x will store 305. In this equation, the numbers 30 and 10are multiplied first, and the number 5 is added to their product. Multiplication, division and modulus have higher order than addition and subtraction, which means that they’re performed first. If two operators sharing…

Read More

Static Class Members

In Java you can create a field or method that does not belong to any object of a class. Such are known as static variables or static methods. Static Variable To declare a static variable, you put them in the class just like instance variables, but you put the keyword static in front. Static variables belong to…

Read More