Changes

Jump to navigation Jump to search
added basic code examples
Line 8: Line 8:  
==Memory Management==
 
==Memory Management==
 
The Java programming language is based on [[Object Oriented programming]] principles, coupled with [[garbage collection]]. This means, unlike [[C]] and other lower level programming languages the developer is able to create programs without worrying about pointers, references and memory. Instead the Java [[Virtual Machine]] is able to manage objects that are in use, periodically deleting objects that are no longer referenced (and therefore no longer required by the program).
 
The Java programming language is based on [[Object Oriented programming]] principles, coupled with [[garbage collection]]. This means, unlike [[C]] and other lower level programming languages the developer is able to create programs without worrying about pointers, references and memory. Instead the Java [[Virtual Machine]] is able to manage objects that are in use, periodically deleting objects that are no longer referenced (and therefore no longer required by the program).
 +
 +
== Example Code ==
 +
=== Hello, World ===
 +
The easiest program in any language is something that displays "Hello, World!".
 +
<pre>package hello;
 +
 +
public class world
 +
{
 +
    public void Main(String[] args) { System.out.println("Hello, World!"); }
 +
}</pre>
 +
 +
=== GUI with JFrame ===
 +
An example of creating and showing a JFrame with nothing in it:
 +
<pre>JFrame frame = new JFrame();
 +
frame.show();</pre>
    
==External Links==
 
==External Links==
 
[http://www.java.com/ Official Java Website]
 
[http://www.java.com/ Official Java Website]
 
[[Category:Programming Languages]]
 
[[Category:Programming Languages]]
50

edits

Navigation menu