Sabtu, 07 Juli 2007

Simple example for object-oriented programming

An example that better demonstrates object-oriented programming:
// OddEven.java
 import javax.swing.JOptionPane;
 public class OddEven {
 private int input;
 public OddEven() { 
 input = Integer.parseInt(JOptionPane.showInputDialog ...
 ("Please Enter A Number"));
 }

Java Example

Hallo World
This is a minimal usage of Java, but it does not demonstrate object-oriented programming well. No object is explicitly created since the keyword new> is never used.
// Hello.java
public class Hello {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
} 

About Java Programming

Java is a programming language originally developed by Sun Microsystems and released in 1995. Java applications are typically compiled to bytecode, although compilation to native machine code is also possible. At runtime, bytecode is usually either interpreted or compiled to native code for execution, although direct hardware execution of bytecode by a Java processor is also possible.
The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. JavaScript, a scripting language, shares a similar name and has similar syntax, but is not directly related to Java.
This blog just for java programing language....So you can learn more about java, java, java, and java....

Google