Basic Java Programming
Perry Xiao · 2018
Java supports reading and writing both text and binary files. This chapter introduces the basic concepts of Java programming, intended for those who have some experience in coding and familiarity with programming concepts but are new to the Java language. Java supports eight primitive types of variables: byte, short, int, long, float, double, char, and boolean. Like many other languages, Java supports a full range of standard operators, such as arithmetic operators, comparison operators, logical operators, bitwise operators, and the assignment operator. In Java, System.out is used to print messages on the computer screen; this is called standard output. System.in and System.console are used to read text from the keyboard; this is called standard input. There are three key ingredients that any programming language must have: sequences, loops, and selections. Arrays are important in scientific and engineering programs. Many applications need to read and write files.