Java

Moderators: zibadian
Number of threads: 7836
Number of posts: 18235

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Java tutorial Posted by javalovar92146 on 12 Jan 2013 at 12:00 PM
First of all, I am new to programmers heaven. Second, Java is an oo programming language. OO means object-oriented. Object oriented is when, in a programming language, objects communicate to one another to perform tasks, and/or call methods.

Heres the structure for a .java source file:

SOURCE
CLASS
METHODS
STATEMENTS

A source is he whole .java file.
A Class is a 'new part' of the source code
A method, aka a void, is a block of code that holds statements.
A statement is a command.

Here's an example code

public class myFirstProgram {
public static void main(String[] args) {
System.out.pintln("Hello!");
}
}


EVERY STATEMENT MUST HAVE A SEMICOLON AFTER IT!

Keep an eye out for my next tutorial!



 

Recent Jobs