确定和调用类的方法 [英] Determining and invoking methods of a class

查看:61
本文介绍了确定和调用类的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨,,

我是编程语言的新手..


我想解决这个问题。


考虑三类的情况.. C1,C2& C3。


C3类有一种接收对象作为争论的方法。


C3类{

public void xxxxx(Object ob)

}


我希望方法的争论能够获取任何类的对象并显示/调用传递给方法的类对象的方法。


例如:如果第一次传递C1对象,那么C1的方法应该能够访问..

如果下次传递C2对象,则为
。 C2的方法应该能够访问..


我提前感谢你解决我的问题

Hi,,
I am new to programming languages..

I want this problem to be resolved.

Consider a situation of three class.. C1, C2 & C3.

Class C3 has a method that receives the object as the arguement.

class C3 {
public void xxxxx(Object ob)
}

I want the arguement of the method to be capable of taking the object of any class and display/call the methods of the class object that is passed to the method.

For eg: if C1 object is passed first time.. thn the methods of C1 should be able to access..

if C2 object is passed next time. thn the methods of C2 should be able to access..

I thank you in advance for solving my problem

推荐答案


嗨,,

我是编程语言的新手..


我想解决这个问题。


考虑三类的情况.. C1,C2& C3。


C3类有一种接收对象作为争论的方法。


C3类{

public void xxxxx(Object ob)

}


我希望方法的争论能够获取任何类的对象并显示/调用传递给方法的类对象的方法。


例如:如果第一次传递C1对象,那么C1的方法应该能够访问..

如果下次传递C2对象,则为
。 C2的方法应该能够访问..


我提前感谢你解决我的问题
Hi,,
I am new to programming languages..

I want this problem to be resolved.

Consider a situation of three class.. C1, C2 & C3.

Class C3 has a method that receives the object as the arguement.

class C3 {
public void xxxxx(Object ob)
}

I want the arguement of the method to be capable of taking the object of any class and display/call the methods of the class object that is passed to the method.

For eg: if C1 object is passed first time.. thn the methods of C1 should be able to access..

if C2 object is passed next time. thn the methods of C2 should be able to access..

I thank you in advance for solving my problem



你好,

在Object类的对象中收集ur对象。内部方法检查

Hi,
Collect ur object in object of class Object. Inside method check

展开 | 选择 | Wrap | 行号



嗨,,

我是编程语言的新手..


我想解决这个问题。


考虑三类情况。 .C1,C2& C3。


C3类有一种接收对象作为争论的方法。


C3类{

public void xxxxx(Object ob)

}


我希望方法的争论能够获取任何类的对象并显示/调用传递给方法的类对象的方法。


例如:如果第一次传递C1对象,那么C1的方法应该能够访问..

如果下次传递C2对象,则为
。 C2的方法应该能够访问..


我提前感谢你解决我的问题
Hi,,
I am new to programming languages..

I want this problem to be resolved.

Consider a situation of three class.. C1, C2 & C3.

Class C3 has a method that receives the object as the arguement.

class C3 {
public void xxxxx(Object ob)
}

I want the arguement of the method to be capable of taking the object of any class and display/call the methods of the class object that is passed to the method.

For eg: if C1 object is passed first time.. thn the methods of C1 should be able to access..

if C2 object is passed next time. thn the methods of C2 should be able to access..

I thank you in advance for solving my problem



你好s16kumar!欢迎来到TSDN!

我理解你是否正确,你想要这样三个类:

Hi s16kumar! Welcome to TSDN!
Do I understand you correctly, you want to have three classes like this:

展开 | 选择 | 换行 | 行号





在Object类的对象中收集ur对象。内部方法检查
Hi,
Collect ur object in object of class Object. Inside method check
展开 | 选择 | Wrap | 行号


这篇关于确定和调用类的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆