Operations

JavaSimilar to punching keys on a calculator, your Java programs rely on operators (+, -, *, /, ?, and a host of others) to work with the variables in your program. Operators can be used to assign value to variables, perform mathematical functions, and create new objects based on variables.

Operators are also used for conditional logic statements such as for loops, while loops, if statements, switch statements, and method calls. Continue reading

Advertisements

Variables

JavaAll computer programs, regardless of the programming language they are written in, read data from somewhere (a file, the keyboard, the mouse, the Internet, etc.), process the data, and then write the data somewhere else such as the computer monitor or a database file on the hard drive.

In Java, like most other programming languages, data is kept in variables. Yes variables – like X and Y and all those other letters you thought you would never use again in high school algebra. As you create Java programs, you have to declare variables, assign values to them, and execute operations using these variables.

Every variable in a Java program has a certain data type. The data type determines what type of data can be contained within that variable and what operations can be executed on the variable. A variable could be a number. Numbers are further broken down into categories based on their size. A variable can also be a string of text. Although you cannot perform mathematical equations on strings, you can use the “+” operator to concatenate two or more strings together. Continue reading

Introduction About Java

JavaWhen you first start learning Java, there are quite a few concepts that may seem foreign to you. One of the most important is the concept of Object Oriented Programming; one of many important subjects that are essential to successfully learning Java programming.

If you have no previous Java programming experience, Java for Absolute Beginners is a great place to get your feet wet while learning by example. In this tutorial, you will learn some of the core concepts inherent to the Java programming language. Without a solid foundation in these concepts, you’re unlikely to be successful with Java or most other programming languages for that matter.

The great thing about learning to program in Java is that there are excellent classes available and a large developer community willing to help should you run into issues along the way. If you get stuck on a particular statement, chances are that hundreds or even thousands of others have been stuck in the same spot before you and a quick Internet search should net you plenty of solutions for your problem.

Whether you have zero programming experience or are just new to Java (and have experience in another language), you will be well served to learn the concepts contained within this article because you will rely on them in practically every line of code you write for your Java applications.