Quantcast
Channel: Programmers Heaven Forums RSS Feed
Viewing all articles
Browse latest Browse all 2703

Java tutorial

$
0
0
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!

Viewing all articles
Browse latest Browse all 2703

Trending Articles