438
Subscribers
-224 hours
-27 days
-1330 days
Posts Archive
Repost from قناة منهج كلية تقنية المعلومات |2005|
The new operator is not required to explicitly create the object that is referenced
Repost from قناة منهج كلية تقنية المعلومات |2005|
.... and .......are the primary mechanisms for passing information into and out of an object.
Repost from لَيطمِئن قــلَبّــكَ
"اللهم يا جامع الناس ليومٍ لا ريب فيه، اجمع لنا بين النجاح والتوفيق في امتحاناتنا. اللهم يسر لنا الصعاب، ووفقنا إلى ما تحب وترضى، وارزقنا فهمًا وذكاءً ونورًا في دراستنا. آمين."
we use it when we need to develop a code that deals with only the parent class
compile time polymorphism is nothing but the method overlloding in java
method is overriden not the datamembers so runtime polymorphism cannot be achieved by data members
class One {
// طريقة m1
public void m1() {
System.out.println("m1 method in class One");
}
}
// الفئة الفرعية Two التي تمتد من One
class Two extends One {
// طريقة m2
public void m2() {
System.out.println("m2 method in class Two");
}
}
// الفئة Test تحتوي على دالة main
public class Test {
public static void main(String[] args){
One N=new One ( );
Two t = (Tow) N ;
//t.m1();
// t.m2();
}
}if we perform it directly java compiler wilk give compile time error
sub class object type has been converted into super class type rhi is kind of conversion
