Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Java tutorial

javalovar92146javalovar92146 Posts: 2Member
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:

[color=Orange]SOURCE[/color]
[color=Green]CLASS[/color]
[color=Purple]METHODS[/color]
[color=Blue]STATEMENTS[/color]

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!
Sign In or Register to comment.