- Java is the internet programming language
- Can be used to develop standalone applications
- Cross-platform,object-oriented,network-based,and multimedia-ready.
CHARACTERISTIC OF JAVA
- Simple
- Object Oriented
- Distributed
- Interpreted
- Robust
- Secure
- Architecture neutral
- High-performance
- Multithreaded
- Dynamic
THE BASIC OF JAVA PROGRAM
- APPLICATION
- Standalone programs
Package : A collection of related classes
Classes : Consists of methods
Method : Designed to accomplish a specific task.
- Use any text editor to create or edit a Java source code
- Save the file.Use the same class name.For example class name : Count, file name should be Count.java
- Compile the program to translate the source code into bytecode.If no syntax errors,compiler will generate file name Count.class
- Execute the program.
Basic element of a java program include
- The main method
- Reserved words
- Special symbols
- Identifiers
- Data types
- Expressions
- Input
- Output
- Statements
to create a java program,it is important to understand :
- Syntax rules
- Semantik rules
- How to manipulate strings and numbers
- How to declare variables and named conctants
- How to receive input and display output
- Good programming style and form.
2. APPLETS
- Program designed to run on a Web browser
- is a program written in the Java programming language that can be included in an HTML page.When use a Java technology-enabled browser to view a page tht contain an applet,the applet's code is transferred to system and executed by the browser's Java Virtual Machine (JVM)
- Created an applet by extending the class JApplet
- class JApplet is contained in package javax.swing
Applet Methods
- i n i t method :
- Initializes variables
- Gets data from user
- Places various GUI components.
- Performs output.
How to Applet Acesses Javascript Method
http://www.bing.com/images/search?q=applet+methods&view=detail&id=23C5C741F432BD0649EC0D4280A5E5F7F057BB98&FORM=IDFRIR
JAVA PLATFORM
- Platform is a hardware or software environment to execute a program.
- It also can be defined as a combination of operation of operating system and hardware.
- The popular platform are Windows 2000,Linux,Solaris,and MacOS
- Java platform is different with other platform because it is only a software to execute an application on different hardware platform.
- It has 2 components :
- Java Virtual Machine (Java VM)
- Java Application Programming Interface (Java API)
Tiada ulasan:
Catat Ulasan