Java was designed with a couple of main purposes in mind
- to be Object Oriented from the beginning,
- as a “write once, run anywhere” model, so that code doesn’t have to be rewritten
While the idea behind Java hasn’t always held true, where lots of front end code would be written and run equally on PCs, Macs, and Linux machines, it has become a powerhouse, especially in back-end business applications. Java is typically one of the most sought after programming languages in the US and other countries. While it may vary based upon region and company, it is a good language to know if you are looking for a first time job.
C/C++ has influenced many languages, and in some ways, birthed those languages. Java is one of those languages, so when you look at Java syntax, you will find it very familiar, here are some of the similarities between Java and C++:
- using a semi-colon at the end of a statement,
- basic syntax for loops, conditions, and more,
- use of a main function,
- same style comments,
- and many more.
Although with new versions of Java it has diverged some over the years from C++, especially as it has added features not in C++, the basic syntax will stay the same.
In future segments, we look at how to create a new file, create a main method, use variables, conditions, loops, and more.
A High Level Java Overview was originally found on Access 2 Learn