Java is a powerful, versatile, object-oriented programming language with a variety of structured elements. As a Java programmer you will be working with classes, methods, interfaces, constructors, variables, exception handling, and more. But before we cover those elements, we need to discuss the basic syntax that is common to all Java programming constructs. This chapter will cover the important elements of basic Java syntax. Specifically we will discuss—
General Java syntax and a simple Java program
Loops and other flow of control structures
Transfer of control statements
Basic printing and keyboard I/O
Java is based on C and C++ and much of its basic syntax is similar ...