Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

passing more than 1 parameter to method  RSS feed

 
dale conn
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all i have this class




i'm trying to call myMethod5 that takes 2 parameters like this

ThreadTest threads = new ThreadTest( 1, getMethod( ThreadTest.class, "myMethod5", new Class[]{ String.class } ), new Object[]{ "Fish", "Chips" } );

But it's not working

Can anyone tell me how i can pass more than one parameter

many thanks
 
Peter MacMillan
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try:


and think why you need that second String.class
 
dale conn
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!