Understanding Super Keyword

Purpose:

    Understanding Super Keyword

Program:

class A
{
	int x;	//declare a variable 'x'
	public a()
	{
		System.out.println("Inside constructor");
	}
	void show()
	{
		x=100;    // assign 'x' variable a value 100
		System.out.println(x); //print value of x
	}
}
class B extends A
{
	public b()  //this is a constructor
	{
		super(); // calls constructor of class A
		super.show(); // calls method of class A
		System.out.println(Super.x);  // calls memeber of class A, that is "x" variable
	}
}

Explanation:
Whenever one class inherits another class, you can call

    parent class constructor via “super();”
    parent class method via “super.show();”
    parent class variable via “super.x;”

Output:
Inside constructor
100
100

For Each loop in Java

Purpose:

    Understanding enhanced for loop

Program:

public class ArrayDemo
{
	public static void main(String args[])
	{
		// declare an array of size 3
		int arr[]= new int[3]; 
		// initialize array with 3 values
		arr[0]=1;
		arr[1]=2;
		arr[2]=3;
		
		//using FOR EACH loop
		for(int n:arr)
		{
			System.out.println(n); // printing array values
		}
	}
}

Explanation:
Here with help of for each loop, we retrieve array values one by one from an array, “arr” and store it in a variable “n”. This for each loop automatically retrieves value one by one, hence no need of increment operator like used in a normal for loop i.e

for(int a; a<3; a++)

Capture

Same program using normal for loop:

public class ArrayDemo
{
	public static void main(String args[])
	{
		// declare an array of size 3
		int arr[]= new int[3]; 
		// initialize array with 3 values
		arr[0]=1;
		arr[1]=2;
		arr[2]=3;
		
		//using FOR loop
		for(int n=0; n<3; n++)
		{
			System.out.println(arr[n]); 
			// printing array values
		}
	}
}

Capture

Hurray!

THANX FOR BEING A PART OF CHANGE 

7Th July ’08 a day when this blog open the eyes….almost like a new born baby this blog entered the whole incredible world of internet. Soon a Blog name-“ULTIMATE CHANGE” was assigned to it. And then what …….what to say more?  This blog really stand up on various issues, discussing each and every common to rare topic this blog always tried to interact with you.

Some times in the form of sweet poems it always tried its best to talk about the ultimate change-“MIRACLE OF LOVE”. On finding out the extent of corruption in politics it posted different posts to bring out reality of Indian Government on various fronts-“MAD ABOUT POLITICS” & ”INCREDIBLE INDIA”. Through -“NEWS OR FUSE” it make you aware of all sorts of Breaking news around the world. And much more similar it posted out to really bring in a change within every individual.

And when it felled that yes some change is really coming into the action…..it mention about it also in form of-”FEEL THE CHANGE”.

So you might be thinking that why I’m telling you all this?. So here comes the time to break the ULTIMATE suspense…. (I think most of you might have got what I’m going to speak out). Yes it’s time to say bye…bye.

No, no it doesn’t mean that i’m leaving out this world of blogging, rather it means that i’m entering into whole new world of it by bringing for you a whole new selfhosted blog, “Ultimate Change”.

>Enter the whole new world<

Change Is Here!

 

AUTHOR-“PRABHJOT”

 

::::::::::::::::::::::::::::::::::: NOTE ::::::::::::::::::::::::::::::::::::::

THIS BLOG WILL NOT DISSOLVE OUT>>

 BUT ON THE SAME HAND NO MORE NEW POSTS WILL BE PUBLISHED HERE NOW ONWARDS.

>>THANX FOR GIVING AROUND 7000 HITS TO THIS BLOG WHITHIN A SHORT SPAN OF 11 MONTHS<<

Welcome U All!

Hello! Everyone,

I welcome you all over here at my new selfhosted blog, “UltimateChange”. It was really an amazing experience from all of you who provided me 145+ comments and approx. 1700 hits in around 11 months of time period for my 50 posts. But i know many of you were little bit annoyed with the features presented at mine previous blog. And that’s why i decided to move ahead, take another step into this world of blogging and provide you change in whole new form.

So now feedback me, how much you liked this change?

(Author)

Prabhjot

What Is The Solution?

Neither by a war we can ruin all this terrorim nor by equipping all the security forces we can win this massive battle.
In fact the ultimate solution lie within all of us,yes simply kill the devil which is hidden at some corner inside every1of us which insist us to go for money,fame via destroying the complete sense of humanity.And the terror game will get over itself.
Jai Hind!

THE ULTIMATE CHANGE STILL AWAITS

Welcome u all…Now the first thing which really,almost like a million dollar question will strike your mind will be that what exactly this blog is all about..specially the title”Ultimate Change” what exactly in the real sense it means?….

So in order to understand it u must have to go through following song…totally composed by me.

So here it goes…….

 

If The World Can’t Remain The Same Forever…

So How Can U say, That We Can Remain The Same?

Thus….We To Have To Move Ahead For A Ultimate Change………..

Yes……..Change………….Yeah!….Change……….

Change…Change…

 

If The Time Keeps On Changing, If The Population Keeps On Growing

So How One Individual Can Remain The Same?

If After Every Sunset There Is A Sunrise, If After Every Bad Time Their Is A good Time……

So How Can We Say That We Will Remain The Same?

If We Too Move For A Change……

Yes……..Change………….Yeah!….Change……….

Change…Change…

 

Going Deeper Into The Meaning We Will Just Find, That Every Second There is Some Sort Of Crime

And How Can We Forget The Corruption Which Is The Ultimate Challenge To The Mankind?

…………..Change…Change……………..

One Government Comes Another Goes, But The Figures Of Poverty, Unemployment Can’t Slip Any More!

Every Year The Government Spends Thousand Of Crores, To Smash Down The Terrorism On To The Floor

But What About The Devil Which Exists In Our Mind?

And What About The Greed Of Everything Which Is The Part Of Our Side ?

So Just Think ……Think For Awhile …….

Ask A Simple Question From Ur Side……….?

That How Can These Thinks Remain The Same ….?

If Every Individual Moves For An Ultimate Change….

Yes……..Change………….Yeah!….Change……….

Change…Change…

 

So Now Don’t Remain Asleep, Just Wake Up From All Your Dreams

Whether You Are Poor Or Rich…Whether You Are An Individual Or A Team…

Irrespective Of The Cast And Irrespective Of The State

You Too Have The Right To Move For An Ultimate Change…

Change…Change…

So Just Make Little Difference In Urself…And You Will Soon See A Big Difference In The Society Itself!

So Whether U Want To Live In A heaven Or In A Hell…

It’s All Now In Your Hands…

 

So I Just Repeat My Words For One More Time…..

That If The World Can’t Remain The Same Forever…

So How Can U say, That We Can Remain The Same?

Thus….We To Have To Move Ahead For A Ultimate Change………..

Yes……..Change………….Yeah!….An Ultimate Change……….

Change…Change….

An Ultimate Change.

 

  

Composed By-Prabhjot Singh

 

 

 

 

So i hope that you as an individual would definately have got an idea that what present scenario(and my blog too) really demands from your side..?

 

So from now the ultimate rollercoaster journey of a massive change..through this blog begins…..