User Profile

Collapse

Profile Sidebar

Collapse
s16kumar
s16kumar
Last Activity: Sep 12 '07, 04:34 AM
Joined: Sep 10 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • s16kumar
    replied to Determining and invoking methods of a class
    in Java
    Lets consider the following example..

    1)
    Classs Customer{
    string custName;
    public Customer(String name) {
    this.custName = name;
    }
    public String getCustName(){
    return this.cusName;
    }
    }

    2)Class Abc{
    Customer c1 = new Customer("John" );
    MainFile mf = new MainFile();
    mf.sample(c1);

    3)

    Class MainFile{...
    See more | Go to post

    Leave a comment:


  • s16kumar
    replied to Determining and invoking methods of a class
    in Java
    Hi guys..

    The reply was right.. But after i accept the object of the class in the object of type Object. The problem is after that i am not able to call the methods of the class object passed to it. The method getClass() gives me the name of the orignal class.. and the method getDeclaredMeth od also does not help..

    Thank you,..
    See more | Go to post

    Leave a comment:


  • s16kumar
    replied to Determining and invoking methods of a class
    in Java
    Thanks for your reply.

    But the problem is i dont know as to how many and wht are the class that i need to check with the object.(Like in this case.. its C1 and C2 are known)..

    How do i generally have an object.. which can invoke the methods of the class that is passed to it.. at runtime..

    Eagerly waiting for ur valuable reply.....
    See more | Go to post

    Leave a comment:


  • s16kumar
    started a topic Determining and invoking methods of a class
    in Java

    Determining and invoking methods of a class

    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...
    See more | Go to post
No activity results to display
Show More
Working...