0% found this document useful (0 votes)
4 views11 pages

Introduction to Java Programming Basics

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views11 pages

Introduction to Java Programming Basics

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Lecture 1: Overview of Java

What is java?

 Developed by Sun Microsystems (James Gosling)

 A general-purpose object-oriented language

 Based on C/C++

 Designed for easy Web/Internet applications

 Widespread acceptance
Java Features
 Simple/
 Object oriented
 Platform Independent
 Portable
 Secure
 Multithreaded
Getting Started: (1)
(1) Create the source file:
 open a text editor, type in the code which defines a class
(HelloWorldApp) and then save it in a file ([Link])
 file and class name are case sensitive and must be matched
exactly (except the .java part)
Example Code: [Link]
/**
* The HelloWorldApp class implements an application
* that displays "Hello World!" to the standard output
*/
public class HelloWorldApp {
public static void main(String[] args) {
// Display "Hello World!"
[Link]("Hello World!");
}
}
Java is CASE SENSITIVE!
Getting Started: (2)
(2) Compile the program:
 compile [Link] by using the following command:

javac [Link]

it generates a file named [Link]


‘javac’ is not recognized as an internal or
external command, operable program or hatch file.
javac: Command not found
if you see one of these errors, you have two choices:
1) specify the full path in which the javac program locates every time.
For example:
C:\j2sdk1.4.2_09\bin\javac [Link]

2) set the PATH environment variable


THE END

You might also like