473,385 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

doubt in opps concept

class A {

public void getID(A a){
}

}


class B : A {

public void getName(){
getID(new B())
}

}


in the above code you can see two class:

class A and class B

and i have written a method called getID which receives the class object as the parameter. so im inheriting the class A in the class B.

in the method getName() im calling the method getID()..

here is my doubt..
I'm passing the object of class B to the method getID.. and in the method getID im receiving the parameter as Class A object..
i'm bout to compile the above code.. it did not throw any error..

can anyone explain the logic behind this...
Mar 29 '07 #1
0 935

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: paul dallaire | last post by:
HI! I want to execute a link witch is in JavaScript, How do we execute this in asp server side if possible? Basically I don't want anyone to see this link in the code view. this is the link...
138
by: ambika | last post by:
Hello, Am not very good with pointers in C,but I have a small doubt about the way these pointers work.. We all know that in an array say x,x is gonna point to the first element in that...
1
by: muthu | last post by:
Hi freinds, Iam using repeator control in my application.The code behind is vb.net. I have n number of rows and 5 columns in the repeator control.In the ItemDataBound event of the repeator...
13
by: sathyashrayan | last post by:
Dear group, pls go through the following function definition: function at_show_aux(parent, child) { var p = document.getElementById(parent); var c = document.getElementById(child); var top ...
12
by: Shhnwz.a | last post by:
Hi, I want to know some of the situations , when to use memcpy() and when to memset(); Thanx in Advance..
122
by: ivan | last post by:
hi all, if I have: if(A && B || C) which operation gets executed first? If I remeber well should be &&, am I correct? thanks
1
rajiv07
by: rajiv07 | last post by:
Hi to all i cannot understand the concept of tie function. is anybody explain to me pelase reply thank u.
2
by: rajendra | last post by:
hi friends, i have placed code because i want to explain my doubt clearly to you ,and i have placed my doubt in Main of the program (static void Main(string args)) by // before that ...
5
by: Jeff | last post by:
hi asp.net 2.0 #1 How do I in the OnSendingMail method get the user email address so I knows where to send the email? #2 What is the code I need to use in the bodyfile for specifying...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.