Tuesday, November 3, 2015

Introduction to Java Programming.

this a blog's author is professionally 'artistic software dev & hacker, paradigmatist, net admin'.

this a blog's author has about 5 years of Professional Experience with Programming in 'Java', with the 'Internet Applications' mostly.

'Java' is a Modern Programming Language, is fairly complex ... as it uses 'Object Oriented Methodology' to make programming of the 'Large-Scale Complex Applications' easier.

there are many tools that enhance 'Programmer's Productivity', one of them is 'Eclipse', an Integrated Development Environment, 'Eclipse IDE'.

after downloading & installing a new versions of:
- 'Java Development Kit',
- 'Eclipse IDE for Java Developers',

we can run 'Eclipse IDE',

we are welcomed by an 'Introduction Screen', similar or exact to this:




Eclipse IDE's welcome screen.



let's close welcome screen's a tab,

let's start a new 'Java Project' ( File -> New -> Java Project ),

let's fill a form as on a screen below,

details might differ as well if we know what are we doing, or if we are willing to experiment a little,

let's press a 'Finish' button after we are done.




New Project's a Form.



let's unfold 'Hello World Project' in a Package Explorer, by pressing a triangle next to Project's name,

let's press right mouse button on 'src', source directory in the Project,

let's choose ( New -> Class ) as on image below, screen might differ in details ... as i've used 'plugin modules' that enhance options available, not everyone has them.




New Class.



let's fill following class form as shown below, details might vary here as well ... to some degree, at least.

feel free to experiment, or not ... but be aware that some of changes might make program work differently or not at all.

let's press a 'Finish' button after we are done.




Class Form.



... now 'Eclipse IDE' will generate a 'Class File' for us automatically,

a part of software to be filled with details by a Programmer.




Auto-Generated a Class File.



let's use editor, mouse & keyboard to edit program's code, as shown on image below:




'Hello World',

an Example Application's code.



let's run application, choosing from Menu a proper command ( Run -> Run ).

we should see something similar or exact as on a screen below,

a 'Hello World !!!' text written in a 'Console' window, below the code edited by us.




Result.



... let's look what we did,

we have commanded a computer to execute 'System.Out' object's method named 'println' with a parameter 'Hello World !!!'.

'System.out' is an object that handles writing to a 'Console', the usual destination of the 'Out' data stream, a part of 'System' object with Java Language's standard functionality.

"Hello World !!!" is written within the quotes "", because Java Language requires that Text (formally 'Text' is named a 'Character String') to be contained between two quotes.

we can also print numbers or values of other expressions, these use a 'different notation', without quotes - often.


for more of 'Java Language', there's a lot to learn:
- basics of 'Procedural Programming' as with a 'Pascal' or 'C' language,
- 'Object Oriented Programming' Methodology,
- 'Java' Programming Language,
- 'Algorithms & Data Structures' are very useful as well,
- 'Concurrent Programming' is very useful too, but often rather difficult for beginners,
- to be truly a Professional there's more to cover as well, including 'Numeric Methods', 'Operating Systems', 'Computer Architecture', ...

perhaps parts of these will be included in 'Java Professionally' a blog.

No comments:

Post a Comment