Java Reference
In-Depth Information
Java is a full-fledged and powerful language that can be used in many ways. It comes in
three editions:
Java Standard Edition (Java SE) to develop client-side applications. The applica-
tions can run standalone or as applets running from a Web browser.
Java SE, EE, and ME
Java Enterprise Edition (Java EE) to develop server-side applications, such as Java
servlets, JavaServer Pages (JSP), and JavaServer Faces (JSF).
Java Micro Edition (Java ME) to develop applications for mobile devices, such as
cell phones.
This topic uses Java SE to introduce Java programming. Java SE is the foundation upon
which all other Java technology is based. There are many versions of Java SE. The latest,
Java SE 8, is used in this topic. Oracle releases each version with a Java Development Toolkit
(JDK). For Java SE 8, the Java Development Toolkit is called JDK 1.8 (also known as Java 8
or JDK 8 ).
The JDK consists of a set of separate programs, each invoked from a command line, for
developing and testing Java programs. Instead of using the JDK, you can use a Java devel-
opment tool (e.g., NetBeans, Eclipse, and TextPad)—software that provides an integrated
development environment (IDE) for developing Java programs quickly. Editing, compiling,
building, debugging, and online help are integrated in one graphical user interface. You simply
enter source code in one window or open an existing file in a window, and then click a button
or menu item or press a function key to compile and run the program.
Java Development
Toolkit (JDK)
JDK 1.8
=
JDK 8
Integrated development
environment
1.24
What is the Java language specification?
Check
1.25
What does JDK stand for?
Point
1.26
What does IDE stand for?
1.27
Are tools like NetBeans and Eclipse different languages from Java, or are they
dialects or extensions of Java?
1.7 A Simple Java Program
A Java program is executed from the main method in the class.
Key
Point
Let's begin with a simple Java program that displays the message Welcome to Java! on the
console. (The word console is an old computer term that refers to the text entry and display
device of a computer. Console input means to receive input from the keyboard, and console
output means to display output on the monitor.) The program is shown in Listing 1.1.
what is a console?
console input
console output
L ISTING 1.1
Welcome.java
1 public class Welcome {
2 public static void main(String[] args) {
3 // Display message Welcome to Java! on the console
4 System.out.println( "Welcome to Java!" );
5 }
6 }
class
main method
display message
VideoNote
Your first Java program
Welcome to Java!
Note that the line numbers are for reference purposes only; they are not part of the program.
So, don't type line numbers in your program.
line numbers
 
 
 
Search WWH ::




Custom Search