• Post Reply Bookmark Topic Watch Topic
  • New Topic

Exchanging data between 2 methods in 2 different classes  RSS feed

 
Preet Rams
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im quite new to Java and this might be a basic doubt. But please help.

I have a class as below:



I have another method



So like you can see..there are 2 different classes, which have the same method, but receive different data. I need to get an input from the user for the name in 2nd class, and I identify the given name with the name in the file that I have...then correlate it with other data in the method like funcgroup and func. The same func is there in the other class too. So I need to make a comparison between them to get the data in the other class like time, etc.

So the data in the methods can be compared to the data structure in C...how do I implement such a structure in Java? I read that structs are similar to classes in Java. But in my case, I have the data in methods and not classes. Please tell me how to solve this problem.
 
Swastik Dey
Rancher
Posts: 1812
15
Android Eclipse IDE Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A small confusion, may be I didn't understand properly. Is the name entered by the user is name of the class? And based on this name, you need to call the method from that class? For e.g. if the user enters EnterLeaveHandler you call handle method of EnterLeaveHandler class?
 
Preet Rams
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for the confusion. By name, I mean the "String name" in method of class DefFunctionhandler.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!