确定和调用类的方法

编程入门 行业动态 更新时间:2024-10-27 22:21:11
本文介绍了确定和调用类的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

嗨,, 我是编程语言的新手.. 我想解决这个问题。 考虑三类的情况.. 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 | 行号

更多推荐

确定和调用类的方法

本文发布于:2023-11-11 23:56:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1579905.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:方法

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!