Tech Blog   »   Home   »   Coders Forum   »   Computer Directory   »   Math Calculators   »   RSS:Directory|Forum 

Programming Language: JAVA Source Code examples

Java is a programming language originally developed by James Gosling at Sun Microsystems (which is now a subsidiary of Oracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to byte code (class file) that can run on any Java Virtual Machine (JVM) regardless of computer architecture. Java is general-purpose, concurrent, class-based, and object-oriented, and is specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere". Java is considered by many as one of the most influential programming languages of the 20th century, and is widely used from application software to web applications

Compiler (Eclipse) showing JAVA Source Code:
public class SampleProgram
{
	public static void main( String [] args )
	{
		System.out.println( "I'm completely obsessed with programming!" );

		System.exit( 0 );
	}
}
/*==================[output]=================================================
I'm completely obsessed with programming!
=============================================================================*/

Syntax

The syntax of Java is largely derived from C++. Unlike C++, which combines the syntax for structured, generic, and object-oriented programming, Java was built almost exclusively as an object oriented language. All code is written inside a class and everything is an object, with the exception of the intrinsic data types (ordinal and real numbers, boolean values, and characters), which are not classes for performance reasons.

Principles

There were five primary goals in the creation of the Java language:

   1. It should be "simple, object oriented, and familiar".
   2. It should be "robust and secure".
   3. It should be "architecture neutral and portable".
   4. It should execute with "high performance".
   5. It should be "interpreted, threaded, and dynamic".

The original and reference implementation Java compilers, virtual machines, and class libraries were developed by Sun from 1995. As of May 2007, in compliance with the specifications of the Java Community Process, Sun re licensed most of their Java technologies under the GNU General Public License. Others have also developed alternative implementations of these Sun technologies, such as the GNU Compiler for Java and GNU Class path.

JAVA - not to be confused with JavaScript



Tutorial: Eclipse Tutorial

Programming Language: JAVA
CodeObsessed.com

Language: JAVA


Code Examples:
Variables
Strings
Arrays
Functions:
Return Values
Pass by Value
Pass by Reference
Loops:
While loop
Do-while
For loop
Arrays:
Basic




More JAVA source code

Forum Area maSpinner

The forum contains more programming examples, registration is free!





Validated with no errors:

Valid XHTML 1.0 Transitional     Valid CSS!


Site Map