Life long sharing . . .

Java Programming – Intro

Posted on: November 19, 2015

Before getting our hands dirty doing the coding, first, let’s go through this brief intro.

Lesson1-note1

Now, let’s go through the basic syntax for Java programming:

Lesson1-note2

You may ask, “What is Java identifier?”

Lesson1-note3

And then, you might ask, “What is Java keyword?” And here they are:

Lesson1-note4

Now, let’s do our first coding.

Lesson1-code1

  • Open notepad and add the code as above.
  • Save the file as: MyFirstJavaProgram.java.
  • Open a command prompt window and go to the directory where you saved the class. Assume it’s C:\.
  • Type ‘ javac MyFirstJavaProgram.java’ and press enter to compile your code. Beware! There are errors in the codes! Correct them. If there are no errors in your code, the command prompt will take you to the next line (Assumption : The path variable is set).
  • Now, type ‘ java MyFirstJavaProgram’ to run your program.
  • You will be able to see the below printed on the window.

Lesson1-code1_output

Reference: 

https://www.udemy.com/java-tutorial/

http://www.tutorialspoint.com/java/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives

November 2015
M T W T F S S
« Oct   Dec »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 180 other followers

%d bloggers like this: