Thursday, 10 March 2011

Simple Java Program

Well,now the post that you all have been waiting for.Today I'll start programming with you guys.
First let me write the program and then I will explain each component of it.

Program 1:Hello World

class Demo
{
    public static void main(String args[])
    {
        System.out.println("Hello World");
    }
}   

Now let me explain you guys the meaning of the code.

Wednesday, 2 March 2011

Golden Rule

I contacted a few people who are into the core IT industry and asked them for a few tips to write a good program.Most of them gave the same tip and I found it really interesting.But before I tell you guys about the tip I would like to share with you guys some of my tips.

  • Keep the logic of the program "Simple".
  • Before you write down the program or a section of a huge code always "visualize" your output.
  • Start "Indenting" your programs.
Let me explain you what Indenting is.It a very simple method

Tuesday, 1 March 2011

Fact Busted!!!!

All the teachers have always taught us that Java is a purely OOP language.Even I have posted it in my article of OOPS(that's because in that article I wanted to tell you about OOP's and not about Java).BUT this is one of the biggest CONCEPTUAL BLUNDERS that each and every student makes.
As a matter of fact Java is a "partly OOP language".Java can be CONSIDERED a purely OOP language "AS COMPARED" to languages like C and C++.
Let me explain why.

Sunday, 27 February 2011

About The Blog

Programming is one thing that you will either hate it or love it.I belong to the latter category (Thanks to my school teacher's who actually made me understand programming the way it should be understood) but unfortunately most of you guys belong to the first one.
Being a student myself,I have often observed that teachers do not come down to the level of the student while explaining different languages.They have years of experience so they are really good at teaching the advanced level BUT the basic level stuff is never clear to most of the students.So I have decided to share my knowledge of programming with you guys so that you can understand the basic's properly.

Hope you guys like the blog and learn sum thing from it.

Please feel free to post comments,positive or negative.It will be highly appreciated.

Also if there is any specific topic that you want me to write on please don't hesitate to ask for it.I will try my level best to arrange it for you.

Thank You,
Yash Agrawal

OOPS Concept

"Object Oriented Programming"
One of the most important features of Java is that it is a "purely" Object Oriented Language.So before we learn to write programs in Java we must understand what exactly is OOP's.
In Object Oriented programming the emphasis is on developing a program around the data rather then the procedure.Programs are divided into small segments known as "Objects".One of the biggest advantages of OOP's is that data is hidden and cannot be accessed by any other external function.Another plus point is that new data members and methods can be easily added whenever necessary.We shall discuss the advantages and applications of OOP later on.
Since OOP is a fairly recent concept different people have different understanding and different working definition of OOP.So we shall summarize the concept as follows:
Whenever an object is created,a memory block is created in the computer memory.It is this block that stores data and the operations that can modify the data.Also different objects are independent of each other so we can run a variety of programs without any modification.

History Of Java

James Gosling,Patrick Naughton,Chris Warth,Ed Frank and Mike Sheridan were the developers of Java.Java was developed at "Sun Microsystems Inc." in the year 1991.Initially it was named as "Oak" but was renamed "Java" in the year 1995.
Java is related to C++ which is a decedent of C language.As a matter of fact Java's character set is inherited from these two languages.Java was invented to create a platform independent programming language or in other words a universal programming language that would work on any PC on the planet!!
When the coding for Java was being done,"World Wide Web" emerged.Had web not taken shape at that time,java would have remained a language for consumer electronics products.BUT today,as we all know,one of the most important uses of Java is Internet programming.