0

Hi All,
I have 2 classes. say Class A and Class B. My logic is coded in a method in class B. I am accessing this method of class B by creating an instance of class B in class A.

To explain better:
Class A{

ClassB b = new ClassB();
b.parse();
}

Class B{

parse(){
// some logic code.
}

At the end of processing the logic in parse() of Class B, I wish to set a boolean flag in Class B. such that after parse() returns what it has to, I will check the flag value and process some stuff in Class A. How can I design my solution? I tried using a static flg value in Class B. But this will not hold good in my case, because there are concurrent users to sign in to my application. Please guide and help.

Thanks,
Ashok.

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by a_iyer20
0

i'll give you these hints, create a boolean variable in class B, make it private and use accessors/mutators to access and change that variable... now you need to learn how to use accessors and mutators> GooD Luck

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.