Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Java
interface i1 extends Object
{
	void show();
}
class Sigma implements i1
{
	public void show()
	{
		System.out.println("Hanosh");
	}
	public String toString()
	{
		return "Manish";
	}
	public static void main(String arg[])
	{
		i1 i=new Sigma();
		i.show();
		String s=i.toString();
	}
}
Posted
Updated 18-Nov-14 5:14am
v2
Comments
Richard MacCutchan 18-Nov-14 8:25am    
Probably magic.
[no name] 18-Nov-14 17:09pm    
Google for "java hello world" and have a look to from the very basic to the basic examples.

I am not sure the intention of this question, but I am quite sure that you need to start reading about programming and this particular language in question.

However, let me list down the areas which program cover:
Any program starts via an Entry Point which is called as Main Function.

http://en.wikipedia.org/wiki/Entry_point[^]

The first statement in the function instantiates a new object of Sigma class.

http://en.wikipedia.org/wiki/Class_(computer_programming)[^]

What you would also notice that this class implements a particular interface.

http://en.wikipedia.org/wiki/Interface_(computing)[^]

Some other concepts which would see here are static members and the access levels of members (Public, Private etc.)

http://en.wikipedia.org/wiki/Method_(computer_programming)#Static_methods[^]

http://msdn.microsoft.com/en-us/library/ms173121.aspx[^]
 
Share this answer
 
v2
It's not magic - but it's not simple to explain either. Start reading here: The Jave Tutorials: Inheritance[^] when you have finished, you should have a better idea.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900