gihan pandigamage wrote:String str = "A";
char ch= str.charAt(0);
System.out.println(ch);
ankittt agarwala wrote:Overriding - same method names with same arguments and same return types associated in a class and its subclass.
Example:
class CSuper
{
null print ( string _name)
{
print "Hello" + _name;
}
};
class CDerived
{
null print ( string _name)
{
print "Hello" + _name + "from Derived";
}
};
Overloading - same method name with different arguments, may or may not be same return type written in the same class itself.
Example:
class CClass
{
string print( int i);
string print(int i, char c);
};
there is a difference between these two and also when you write programs you will get to know their use too.
Read more: http://wiki.answers.com/Q/Difference_between_overriding_and_overloading#ixzz1UeNV7W7y
Campbell Ritchie wrote:No, static members are not polymorphic. In fact you ought only to call static members by className.memberName, rather than on an object name.
Wouter Oet wrote:Number 1 isn't a question but anyway for each of those topics is a huge amount of info out there. What don't you exactly get?
ashok bantu wrote:how to make a class not to inherit and not to instantiate simultaneously
Sandeep Kumar B wrote:Instance block